hi i just created an app using visual.net i need some dll to run the app, is there any way to have the app looking for this app in the wimdows/system32 folder instead of the folder where the .exe is located?
You want the dlls to be located not in the .exe's folder or in program files, but in /windows/system32 ?
Maybe you should add a setup project also for deployment
Anyway, if you need to find out where the system32 folder, (c:/windows/system32, d:/windows/system32 etc meaning that windows may have been installed in drive c, d, etc), take a look at : System.Environment() namespace.
Putting your private executable (DLL or EXE) in the windows or system32 directory is not a good idea. Those directories are intended for operating system files, not 3rd party applications.
If your DLL needs to locate an EXE, then it would be best to either pass a path to a method in the DLL, or have the DLL look in a well-known registry key for the location where the EXE got installed.
Chip H.
____________________________________________________________________ If you want to get the best response to a question, please read FAQ222-2244 first
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.