tenfour
20th April 2002 08:02 UTC
SetCurrentDirectory
In a nutshell: How do you get NSIS to set the current directory, ala SetCurrentDirectory()?
Here's my issue: I need to UnRegDLL a COM DLL in the uninstall section. That COM DLL is dependent on another DLL that's in the same dir as it, but of course loading the COM DLL fails because it can't find the dependency... the logical way to solve this is to use SetCurrentDirectory() to put the current directory in with the COM DLL, unregister it, and continue along.
I can't seem to find a way to change the current directory in code though :/
Smile2Me
20th April 2002 10:12 UTC
http://firehose.net/free/nsis/makensis.htm#SetOutPath
SetOutPath controls the current dir.
-Hendri.
tenfour
20th April 2002 19:54 UTC
That's what I thought, but that doesn't work. SetOutPath appears only controls how NSIS will handle relative paths, it doesn't actually SetCurrentDirectory.
I've tried your suggestion, but UnRegDLL doesn't use $OUTDIR as the current directory.
tenfour
Smile2Me
21st April 2002 09:14 UTC
tenfour,
I'm not sure that I understand what you want to do, but anyway, here's a dll that sets and gets (for checking purpose) the current dir. Does it work now?
Good luck, greetz,
-Hendri.
kichik
21st April 2002 14:17 UTC
Here is one without using any DLL or source changing:
http://forums.winamp.com/showthread....threadid=79913
tenfour
21st April 2002 23:17 UTC
Wow, thank you so much :) I didn't see that other thread.
Smile2Me
22nd April 2002 07:40 UTC
I forgot about this thread, sorry.
-Hendri.