Olaf van der Spek
26th March 2004 11:01 UTC
GetDLLVersionLocal and PATH
Would it be possible to modify the GetDLLVersionLocal to use the PATH environment variable if the DLL can't be found directly, just like the OS does?
The reason I'm asking is that I don't want to hard-code paths in my NSIS scripts and I want those scripts to work on all systems without modifications.
I don't want to copy the DLL to the current directory either and I think lots of users that include DLLs would love this feature.
Joost Verburg
26th March 2004 14:30 UTC
You'll have to execute and external application that writes a header file with the location.
kichik
26th March 2004 17:00 UTC
GetDLLVersionLocal is usually used in conjunction with File. Both don't look in the PATH so you won't include wrong files by mistake.
If you want your script to work on all systems, you can read environment variables such as WINDIR using $%WINDIR%. For example:
GetDLLVersionLocal "$%WINDIR%\explorer.exe" $0 $1
Olaf van der Spek
26th March 2004 21:28 UTC
The DLL I'd like to include is inside system32 and there's no env var that contains that path.
What is the chance the wrong DLL is being included, especially considering the OS would then probably load the wrong DLL too?