ajfisher
8th September 2006 20:36 UTC
Unisntaller not working...
Hello, All--
My uninstall doesn't want to remove everything I tell it to.
I have my list of uninstall macros set up in a header file, here is one example:
macro REM_RESOURCES
Delete/REBOOTOK "$INSTDIR\Resources\Backgrounds\Aqua.bmp"
>Delete /REBOOTOK "$INSTDIR\Resources\Backgrounds\Art1.bmp"
>Delete /REBOOTOK "$INSTDIR\Resources\Backgrounds\Art2.bmp"
>.
.
.
!macroend
>
I call them, and the ones that control removing start menu/other shortcuts, registry entries, etc seem to work, but my files always get left behind when the uninstaller is run.
I'm not sure what I need to fix this. Suggestions appreciated.
Thanks!
Allen
ajfisher
8th September 2006 21:17 UTC
I found it (Finally) $INSTDIR wasn't getting set.
*grumble, grumble, Occhem's Razor, grumble*
JasonFriday13
10th September 2006 22:52 UTC
Just a note: The $INSTDIR in the installer is not always the same as the uninstaller. The $INSTDIR for the uninstaller is set by the current directory the uninstaller is in.
ajfisher
11th September 2006 14:39 UTC
Jason--
Thanks for the tip. What I've been doing is setting $INSTDIR in the .unOnInit fcn, by reading the InstallPath registry key that I write on installation (thanks EclipseNSIS!). I was just reading the wrong non-existant key.
Is there any reason that my approach wouldn't work?
Thanks again,
Allen
Afrow UK
11th September 2006 17:55 UTC
I recommend validating the path by checking that a file exists in the folder. The install path registry entry could get deleted sometime after installation.
-Stu
ajfisher
11th September 2006 18:08 UTC
Stu--
Good idea. I just haven't gotten around to bulletproofing everything yet. Just wanted to make sure that my initial method was OK.
Thanks!
Allen