Archive: SetCurrentDirectory


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 :/


http://firehose.net/free/nsis/makensis.htm#SetOutPath

SetOutPath controls the current dir.

-Hendri.


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


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.


Here is one without using any DLL or source changing:
http://forums.winamp.com/showthread....threadid=79913


Wow, thank you so much :) I didn't see that other thread.


I forgot about this thread, sorry.

-Hendri.