wacaveman
13th August 2007 16:51 UTC
Uninstaller questions...
I am also doing a two-in-one install. I have everything worked out (I think), except for the uninstaller. I have an uninstaller for each package, which does everything, with the exeption of being able to delete the shortcuts correctly.
Is it possible to pass information to the Uninstall section using variables? Globals don't seem to stick very well. It does seem a bit odd, as $INSTDIR works fine, but everything I define does not.
Thanks,
-Kevin
Backland
13th August 2007 18:01 UTC
Since the variables are initialized at runtime, they're not going to be available in the uninstaller. The built in variables are automatically detected at runtime.
If you need some install data in the uninstaller, you can save that data to the registry or a file at install time, see the ReadRegStr and ReadINIStr functions.
wacaveman
15th August 2007 16:32 UTC
I wound up getting this to work by parsing $INSTDIR, which seems to be magically populated.
-Kevin
darthvader
15th August 2007 16:42 UTC
The $INSTDIR populated is the default value you have given by using this command
InstallDir "XXXXXXXX"
Hence when the user changes the Installation Directory your uninstallation will fail. So the best bet is to make a registry entry and then read it back during uninstallation.
Backland
15th August 2007 19:02 UTC
Yes, if the user changes the install dir at runtime, that will break your uninstaller (unless you disable the user from selecting a dir).
wacaveman
15th August 2007 19:55 UTC
No, since the installer is two-in-one (actually about seven-in-one), the directories are fixed,and the user doesn't have the luxury of changing directories. Since I overwrite $INSTDIR (rather than using InstallDir), it seems to work fine. Much better than the alternative of having installers three levels deep.