Archive: Unisntaller not working...


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

I found it (Finally) $INSTDIR wasn't getting set.

*grumble, grumble, Occhem's Razor, grumble*


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.


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


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


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