Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dll

Status
Not open for further replies.

luisve

Programmer
Jun 24, 2005
29
US
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?
 
?? to have the app looking for this app ??

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.


That's all from me
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top