Hi,
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?
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Avoid maintenance: UNINSTALL doesn't work
Started by
jhe
, Jul 24 2003 07:31
6 replies to this topic
Posted 24 July 2003 - 15:25
Well you definitely did something wrong as I successfully avoid Maintenance mode every day.
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.
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
Somewhere near the beginning of you code you need to check for the uninstall argument with the line:
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.
CODE |
if (CMDLINE = "Uninstall") then // --> Remove all components ComponentRemoveAll(); ComponentTransferData(MEDIA); endif; |
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
Actually ozone that's not required. By default, the uninstall information created by my previously metioned calls will automatically do just that. Checking for such an argument is only necessary if you wish to expand the default functionality of the uninstall process such as uninstalling some 3rd party application, having your own uninstall wizard, etc.
Posted 29 July 2003 - 10:26
[TacoBell00]
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 ??
[Ozone]
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?
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 ??
[Ozone]
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
Well my installs automatically get "-uninst " at the end of UninstallString, not "UNINSTALL".
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".
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
I agree with TacoBell00. I tried to simulate your results and could not. I use InstallShield 6.12, created a setup using the default script. Then modified the script using the instructions by Stephan Krueger to avoid maintenance mode.
http://www.installsi....htm#avoidmaint
(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.
http://www.installsi....htm#avoidmaint
(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.