This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Uninstall/upgrade error
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 14, 2008
10:35 AM
Uninstall/upgrade error
I have produced a major upgrade to our product. As part of the major upgrade I have entered a row into the upgrade table that will uninstall any older version of the product.
All works fine so far...
However, due to error in our older MSIs, a silent uninstall will cause the INSTALLDIR property to end up without a value. Thus meaning that the uninstall part of the upgrade will fail with a message "Cannot find specified path...."
If I could pass a parameter into the uninstall then I could perhaps gets round this, but I think the uninstall path is pre-stored in the registry. Can anyone think of any other way to get round this?
Otherwise I shall have to result to an entry in the user notes to manually uninstall old versions of the products before uninstalling the new one. People do not always read user notes though and I can see lots of support calls being raised unless I can sort it out!!!
Many thanks for any suggestions...
All works fine so far...
However, due to error in our older MSIs, a silent uninstall will cause the INSTALLDIR property to end up without a value. Thus meaning that the uninstall part of the upgrade will fail with a message "Cannot find specified path...."
If I could pass a parameter into the uninstall then I could perhaps gets round this, but I think the uninstall path is pre-stored in the registry. Can anyone think of any other way to get round this?
Otherwise I shall have to result to an entry in the user notes to manually uninstall old versions of the products before uninstalling the new one. People do not always read user notes though and I can see lots of support calls being raised unless I can sort it out!!!
Many thanks for any suggestions...
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 14, 2008
04:29 PM
The simplest way to resolve this for the existing release would be to perform a "manual" major upgrade. This would basically involve keeping your existing major upgrade item in the Upgrades view, but change the Detect Only option on the upgrade item's Advanced tab to Yes. Then, make a note of the Detect Property name for use later. Create a new EXE custom action (path referencing a directory) with the following parameters:
Working Directory: SystemFolder
Filename & Command Line: msiexec.exe /X {Old_ProductCode}
Install UI Sequence: some point after CostFinalize
Install UI Condition:
This will cause Windows Installer to detect if your old product is installed but will not automatically remove it. The EXE custom action will run the uninstall of the old product if Windows Installer found the previous product (the detect property will be set to a list of related product codes).
There are some downsides to this method:
- If there is more than one previous product, an InstallScript, DLL, or other programmatic type of custom action would be needed to parse through the detect properties list of product codes.
- The old product will not be uninstalled if the new install is run silently (the custom action cannot be in the execute sequence since it runs another MSI install).
Any major upgrades after this point that don't need to compensate for uninstall failures of the older products can use the normal automatic major upgrade method.
Working Directory: SystemFolder
Filename & Command Line: msiexec.exe /X {Old_ProductCode}
Install UI Sequence: some point after CostFinalize
Install UI Condition:
This will cause Windows Installer to detect if your old product is installed but will not automatically remove it. The EXE custom action will run the uninstall of the old product if Windows Installer found the previous product (the detect property will be set to a list of related product codes).
There are some downsides to this method:
- If there is more than one previous product, an InstallScript, DLL, or other programmatic type of custom action would be needed to parse through the detect properties list of product codes.
- The old product will not be uninstalled if the new install is run silently (the custom action cannot be in the execute sequence since it runs another MSI install).
Any major upgrades after this point that don't need to compensate for uninstall failures of the older products can use the normal automatic major upgrade method.