(NSIS version: 2.18)
I have a ocx file which I need to register that depends on other dll files. I am putting all of the files related to that ocx in a subdirectory under my INSTDIR. I see that in the documentation, I need to use SetOutDir to that subdirectory before I call RegDLL on the ocx. However, I cannot currently call UnRegDLL on the ocx, as I cannot use SetOutDir in the uninstaller.
Is there any reason that EW_REGISTERDLL can't change the working directory to the directoy of the DLL before th LoadLibrary call and change back after all is done? I think this is the correct behavior, and I think this is what regsvr32 does.
Logged In: YES
user_id=584402
Originator: NO
regsvr32 uses LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH.
SetOutPath can be used in the uninstaller as well. Why can't you use it?
Logged In: YES
user_id=5061
Originator: YES
Hmm... I wish I knew how it happened, but between writing the lines in the installer section and the uninstaller section, I somehow changed from "SetOutPath" to "SetOutDir", which of course threw an error. This makes me feel kinda stupid.
Still, is there any reason why NSIS can't handle either doing the directory changing in the engine during EW_REGISTERDLL, or use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH? I would think you'd always want to have windows look for supporting DLL files in the same directory as the DLL file, when one is named with a full path, anyway.
Logged In: YES
user_id=584402
Originator: NO
Size concerns. But you're right... It'd make RegDLL a lot more straight forward and it will "just work". Done for 2.24.