Avoid maintenance: UNINSTALL doesn't work
Posted 24 July 2003 - 07:31
I tryed the sugested solution for avoiding the maintenance mode but it doesn't seem to work that well.
When you install the app. with the modifications, and run the setup for a second time it will reinstall the app. again as it is supposed to do.
But uninstalling is a problem:
If you run the setup only ONCE, the uninstall works fine (add/remove programs). But after I ran the setup a second time, it won't uninstall anymore.
The CMDLINE parameter is empty after a second install. And it stays that way! Even if you specify the uninstall_STRING agian in the ComponentsReinstall();
Am I doing something wrong? or is this know to you and so is there a work around?
Posted 24 July 2003 - 15:25
From your description, it sounds like the 2nd time there's still an entry in Add/Remove Programs, but it's simply not working. If such is the case, then what's the contents of its associated registry entry of HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\<SetupGUID>.
Also, in your OnMoving event are you making calls to InstallationInfo & DeinstallStart to properly create your default uninstall information.
Finally, the system variable UNINSTALL_STRING is only used for Maitenance mode, so specifying it is futile.
Posted 24 July 2003 - 15:26
if (CMDLINE = "Uninstall") then
// --> Remove all components
Welcome to the world of custom scripting!
If you still require more help, you can e-mail your script to me and I will help you de-bug it.
Posted 25 July 2003 - 01:03
Posted 29 July 2003 - 10:26
1. My HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\<SetupGUID> key looks fine.
After the first run it shows an uninstallkey with "UNINSTALL" at the end, but after I ran my setup a second time the "UNINSTALL" at the end of the uninstall-key is "GONE"(with the wind ).
2. In the OnMoving event I'm not making any calls to InstallationInfo & DeinstallStart. Should I do this ??
Indeed I perform the "if (CMDLINE = "Uninstall") " check to see what I should do. But since the uninstallkey in the registry isn't correct after I ran the second setup a second time, this check is pointless. The CMDLINE param will always be empty.
Thnx guys for the reply's.... ... but I m still having the same probs....
I'm thinking of editing the uninstallkey for my self. If the "UNINSTALL" is not there I just add it my self. But can I do this without administrtor rights?
Posted 29 July 2003 - 13:34
I would also recommend making those calls to InstallationInfo & DeinstallStart.
However, you should first understand your setup and figure out, through InstallShield's debugging tools, what's causing the uninstall to be written & re-written in a different fashion. Try setting some breakpoints and stepping through your code to see when these registry entries are being written.
Also, no, you can't edit that uninstall key without administrator privileges, but you should already be requiring such rights for your setup. Again though, you should understand the core problem instead of applying some sort of quick fix "band aid".
Edited by TacoBell00, 29 July 2003 - 13:42.
Posted 29 July 2003 - 16:59
(Under the subtitle: Remove from Control Panel, Reinstall from Setup.exe)
It might be easier to start over, do the above edit, then add any customization you require in your setup.