Auto-Uninstall/NT 4
I've been using NSIS for all the windows side installers at my job. What I've being doing recently is having the installers check for a previous installation and then prompting the user if a previous version is found. The problem is that on NT 4.0, this doesn't work for some reason. I'm doing this check in .OnInit, and I've tried using ExecShell, Exec, ExecWait, and even !system, but none of them will work. If I move this code out of .OnInit and into the main section, then the Exec's will work, but then you have to loop to prevent the installer from continuing the run - it's a mess. So it would be great if this kind of thing could be integrated into the scripts as an option.

Other things that would be nice would be if the uninstaller could close by default. I tried manipulating autoclose a bunch of different ways, but I couldn't get it to work. Maybe I'm doing something wrong, but I tried all the ways I could see.

Having variables so you can increment and decrement. I've been working in the registry and absolutely have to loop, so I basically have a large if x == 3, x = 4 type of deal. So that would be a nice addition.

I love this installer, saved a lot of $$$ since it's free, and have been able to do all kinds of great and crazy stuff with the scripts. I've just spent the majority of today trying to come up with a good solution for this apparently NT 4 problem, but I haven't seen it on any of the other versions of windows 95 up. It could potentially be a memory problem as the machine has 32 mb of ram total, which is pretty bad for NT 4.

Here's my code I've been using to do the uninstall, any ideas would be greatly appreciated. Thanks:

Function .onInit

strcpy $4 "FlingIt!"

ReadRegStr $9 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$4" "UninstallString"
strcmp $9 "" Clean PrevInst

Clean:
goto InitDone

PrevInst:

ReadRegStr $8 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$4" "DisplayName"

MessageBox MB_YESNO "$8 found$\nUninstall this version?" IDNO InitDone
ExecShell "" "$9" SW_SHOWNORMAL

InitDone:
FunctionEnd