I've searched the forum without any luck...
I want to register/unregister some dll's with my setup program (apart from installing the rest of the application) and the first section works just fine.
During install, I unreg the dll in two locations (to awoid duplicates) and the one that unregisters from the installation folder (marked: >>) works just fine during setup, but when using the exact same command during uninstall it fails...
(could not load: c:\program files\TEST\TEST.dll)
running a "regsvr32 /U TEST.dll" from the commandprompt works just fine too, so the option would be using ExecWait, or ?
Anyone have a solution for this problem ?
Section "Test" TST
SetOutPath $INSTDIR\TEST
File TEST\TEST.dll
UnRegDLL $SYSDIR\TEST.dll
>> UnRegDLL $INSTDIR\TEST\TEST.dll
RegDLL $INSTDIR\TEST\TEST.dll
WriteUninstaller "$INSTDIR\uninstall.exe"
SectionEnd
Section "Uninstall"
UnRegDLL $INSTDIR\TEST\TEST.dll
RMDir /r "$INSTDIR\TEST"
SectionEnd
Many thanks,
Magnus
Problems using UnRegDLL
6 posts
Make sure the DLL has all its dependencies where it can find them. Using the following before UnregDLL should probably do it:
SetOutPath $INSTDIR\Test
SetOutPath sets the working directory which is one of the directories where Windows looks for DLL dependencies. Don't forget to set it to something else before you want to delete the directory because the working directory cannot be deleted.
SetOutPath $INSTDIR\Test
SetOutPath sets the working directory which is one of the directories where Windows looks for DLL dependencies. Don't forget to set it to something else before you want to delete the directory because the working directory cannot be deleted.
Brilliant, it works like a charm...
Thanks a lot!
/Magnus
Thanks a lot!
/Magnus
Sorry for revive so old thread, but this is the only entry about this topic that Google shows me 😉
I have exactly the same problem; my uninstaler can't unregister a dll. It sais "could not load: C:\program files\MediaTab\MediaTab64.dll"
I tried what T595 said, adding SetOutPath $INSTDIR\MediaTab before UnRegDll but it doesn't solve the problem. Also, I tried with different values for SetOutPath without any change.
Any help? Thanks
I have exactly the same problem; my uninstaler can't unregister a dll. It sais "could not load: C:\program files\MediaTab\MediaTab64.dll"
I tried what T595 said, adding SetOutPath $INSTDIR\MediaTab before UnRegDll but it doesn't solve the problem. Also, I tried with different values for SetOutPath without any change.
Any help? Thanks
I guess it's a x64 Dll?
This post is about installation, but the same applies for uninstallation:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
This post is about installation, but the same applies for uninstallation:
Thanks for your help.
I tried what you said, but I's still failling. This is my uninstall code:
... stuff ...
${If} ${RunningX64}
;SetRegView 64 --- Commented because I used it before
Delete "$INSTDIR\Uninstall.exe"
;UnRegDLL "$INSTDIR\MediaTab64.dll" --- Commented because I used it before
define LIBRARY_X64
!insertmacro UnInstallLib REGDLL NOTSHARED NOREBOOT_NOTPROTECTED "$INSTDIR\MediaTab64.dll"
!undef LIBRARY_X64
... more stuff ...
The error still is "Could not load: C:\program files\MediaTab\MediaTab64.dll"
Thanks again; any other idea?
P.D: manual unregistering with regsvr32 works perfect
EDIT ------------------------
I defined LIBRARY_X64 at the begining of the script and I didn't remember it; I have commented the define at unistall part and now it's working.
Thank you so much!
I tried what you said, but I's still failling. This is my uninstall code:
... stuff ...
${If} ${RunningX64}
;SetRegView 64 --- Commented because I used it before
Delete "$INSTDIR\Uninstall.exe"
;UnRegDLL "$INSTDIR\MediaTab64.dll" --- Commented because I used it before
define LIBRARY_X64
!insertmacro UnInstallLib REGDLL NOTSHARED NOREBOOT_NOTPROTECTED "$INSTDIR\MediaTab64.dll"
!undef LIBRARY_X64
... more stuff ...
The error still is "Could not load: C:\program files\MediaTab\MediaTab64.dll"
Thanks again; any other idea?
P.D: manual unregistering with regsvr32 works perfect
EDIT ------------------------
I defined LIBRARY_X64 at the begining of the script and I didn't remember it; I have commented the define at unistall part and now it's working.
Thank you so much!