All auto-uninstallers are buggy... No solution, Better work around?
I've researched this issue all through the forums here and at the archives. I've tried everything I've found to help uninstall a previously installed application (same directory) but fail everytime in one way or another...
Most likely I would blame myself. I have a snapshot build about less than a week old from this posting. I've checked the following links and ran all examples in partial success.
http://nsis.sourceforge.net/site/ind...&tx_faq_faq=14
http://nsis.sourceforge.net/archive/...php?pageid=326
http://forums.winamp.com/showthread....ight=uninstall
http://forums.winamp.com/showthread....ight=uninstall
http://forums.winamp.com/showthread....ight=uninstall
http://forums.winamp.com/showthread....ight=uninstall
The above is about all I've been through and all solutions I've managed to gather from these postings all had one problem in common with my installer. It would managed to remove the registry entries but 100% of the time it would not fully uninstall the files and directories the uninstaller usually always remove...
The good old ExecWait '"$INSTDIR\uninstall.exe" _?=$INSTDIR' might or might not be the culprit but its basically found in all examples. In my situation it never removes everything but itself. There will always be directories left behind and within them a plethora of files. I've noticed though if I ran the installer twice it would usually get rid of them the second time around, if not the third time for sure.
Being this was the case and considering I've got my latest snapshot from the official NSIS archive I thought then how about looping it? But I could not manage to loop it without going through the "are you sure you wish to uninstall" for every loop... Yeah, I tried the silent uninstall option by calling the "/S" but I guess my build didn't have it enabled... I could never get it to silently uninstall...
Ultimately I've managed to create a real simple solution but something about it is bothering me. This solution is childs play and I am sure but it does better than anything I've managed to come across so far... Here it is...
CopyFiles "$INSTDIR\uninstall.exe" "C:\uninstall.exe"
ExecWait '"C:\uninstall.exe" _?=$INSTDIR\'
Delete "C:\uninstall.exe"
The above snippet removes all of the applications associated extensions, registry entries and removes the entire applications directory... Perfect but a new problem stems from this... Forgive me but I am quite anal if any program leaves behind even the tiniest, simplest and most harmless registry entry or value... I believe if the installer installs it, the uninstaller should uninstall it...
One new registry value is created but for the life of me I cannot delete it through the new applications installer... I am sure if not absolute it can be done but I am not knowledgeable enough to do it at the moment... I need help.
The value left behind is created from the old uninstaller on the c:\ drive... I do not know how to record it's creation or how to simply delete it... The following is more information in regards to the value...
KEY INFORMATION:
Computer: Local
Hive: HKEY_USERS
Key: S-1-5-21-971929597-1256799619-874574627-1005
\Software\Microsoft\Windows\ShellNoRoam\MUICache
Full Path: HKEY_USERS\S-1-5-21-971929597-1256799619-874574627-1005
\Software\Microsoft\Windows\ShellNoRoam\MUICache
Number of Sub Keys: 0
Number of Values: 327
Last Modified: Sunday, October 12, 2003 3:09:57 PM
VALUE INFORMATION:
Value: C:\uninstall.exe
Type: REG_SZ (String)
DATA INFORMATION:
Data: uninstall
I am on Windows XP and would appreciate a solution which will work on all NT systems. 95/98/ME are obsolete. NT/2000/XP/2003 is the target.
Can someone help me pinpoint uninstalling the new registry value?
Thank you for your time on this issue. It is greatly appreciated.