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: Tutorial to uninstall old version and then install new version in single installation
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
‎Apr 28, 2015
08:55 PM
Tutorial to uninstall old version and then install new version in single installation
Hi,
Could anyone provide steps to uninstall old version and then install new version during installation?
I just couldn't get this up where it keep prompts me error from the situation below:
With package code, product version changed, product code and upgrade remain unchanged.
It gives me error "Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel."
With package code, product code, and product version changed, upgrade code remain unchanged.
It gives me error "A newer version of this application is already installed on this computer. If you wish to install this version, please uninstall the newer version first. Click OK to exit the wizard."
My setting for the Upgrade settings are as below:
Small/Minor Upgrade Settings
- Disable
Major Upgrade Settings
- Completely uninstall old setup before installing new setup
- Products sharing my Upgrade code.
- Min version : Blank
- Include Min version : No
- Max version : ***ALL_VERSIONS***
- Include Max version : No
- Detect Only : Yes
- Detect Property : ISFOUNDNEWERPRODUCTVERSION
Any idea what should I do so that i can just uninstall the previous installed version if found and then continue to install new version in a single installation?
Could anyone provide steps to uninstall old version and then install new version during installation?
I just couldn't get this up where it keep prompts me error from the situation below:
With package code, product version changed, product code and upgrade remain unchanged.
It gives me error "Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel."
With package code, product code, and product version changed, upgrade code remain unchanged.
It gives me error "A newer version of this application is already installed on this computer. If you wish to install this version, please uninstall the newer version first. Click OK to exit the wizard."
My setting for the Upgrade settings are as below:
Small/Minor Upgrade Settings
- Disable
Major Upgrade Settings
- Completely uninstall old setup before installing new setup
- Products sharing my Upgrade code.
- Min version : Blank
- Include Min version : No
- Max version : ***ALL_VERSIONS***
- Include Max version : No
- Detect Only : Yes
- Detect Property : ISFOUNDNEWERPRODUCTVERSION
Any idea what should I do so that i can just uninstall the previous installed version if found and then continue to install new version in a single installation?
(13) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 01, 2015
02:55 PM
The second scenario is the correct setup but you made the mistake of editing the prevent downgrade item instead of creating a new major upgrade item. The prevent downgrade item is used to check for higher versions but since you changed it to earlier versions you are seeing the message when you normally wouldn't.
Prevent Downgrade item: http://helpnet.flexerasoftware.com/installshield20helplib/installshield20helplib_CSH.htm#helplibrary/PreventingDowngrades.htm
Creating a Major Upgrade: https://flexeracommunity.force.com/customer/articles/en_US/INFO/Q211822
Prevent Downgrade item: http://helpnet.flexerasoftware.com/installshield20helplib/installshield20helplib_CSH.htm#helplibrary/PreventingDowngrades.htm
Creating a Major Upgrade: https://flexeracommunity.force.com/customer/articles/en_US/INFO/Q211822
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 05, 2015
04:13 AM
tjohnson1 wrote:
The second scenario is the correct setup but you made the mistake of editing the prevent downgrade item instead of creating a new major upgrade item. The prevent downgrade item is used to check for higher versions but since you changed it to earlier versions you are seeing the message when you normally wouldn't.
Prevent Downgrade item: http://helpnet.flexerasoftware.com/installshield20helplib/installshield20helplib_CSH.htm#helplibrary/PreventingDowngrades.htm
Creating a Major Upgrade: https://flexeracommunity.force.com/customer/articles/en_US/INFO/Q211822
I don't get you what does it mean i edited the Prevent Downgrade Item?
What setting did i changed where i can't really trigger the installer to uninstall the previous version?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 06, 2015
07:14 AM
Select Media > Upgrades
Expand the tree for '+ Upgrade Windows Installer Setup' if it is not already expanded.
Select this top tree item and view the settings. This controls how the uninstall works. For me I completely uninstall the old setup before installing a new setup because there are some unversioned files that I find problematic with the second option. But the second option is faster. It is worth testing to see if it will work for you.
You want to add a new entry here if it does not already exist. The default entry for Prevent downgrades is inserted when you create a new project and is ONLY for detecting a newer version. Do not modify this entry, create a new one using a right click on the top of the tree and select option for a new major upgrade item.
I have an entry for "NewUpgradeForCurrentProject" (note that the name is not important, it just helps me to identify it)
On the Common Tab select the option 'Products sharing my upgrade code'. NOTE: Never change your upgrade code for an active product. Only change your product code and product version and package code.
You can specify a range of version numbers to include or select 'Any earlier version'.
Double check the advanced tab - these should be automatically set for you based on your settings on Common. Note that by default Maximum Version is set to ***ALL_VERSIONS***. This is because when your project builds, InstallShield will inject the current Product Version here.
Set a Detect Property here. You can use this detect property to specify a message to display like notifying the consumer that the current version will be uninstalled. However, it is not necessary to do this. I don't but I just wanted to point out that you can use this property to control the text on a particular dialog, for instance the welcome dialog.
It can take a little bit to better understand the upgrade process. MSDN has some great articles on the upgrades. When you have a chance do a search for MSDN major upgrade and also MSDN windows installer patches. It will help in the long run because you will better understand what options are available to you.
Expand the tree for '+ Upgrade Windows Installer Setup' if it is not already expanded.
Select this top tree item and view the settings. This controls how the uninstall works. For me I completely uninstall the old setup before installing a new setup because there are some unversioned files that I find problematic with the second option. But the second option is faster. It is worth testing to see if it will work for you.
You want to add a new entry here if it does not already exist. The default entry for Prevent downgrades is inserted when you create a new project and is ONLY for detecting a newer version. Do not modify this entry, create a new one using a right click on the top of the tree and select option for a new major upgrade item.
I have an entry for "NewUpgradeForCurrentProject" (note that the name is not important, it just helps me to identify it)
On the Common Tab select the option 'Products sharing my upgrade code'. NOTE: Never change your upgrade code for an active product. Only change your product code and product version and package code.
You can specify a range of version numbers to include or select 'Any earlier version'.
Double check the advanced tab - these should be automatically set for you based on your settings on Common. Note that by default Maximum Version is set to ***ALL_VERSIONS***. This is because when your project builds, InstallShield will inject the current Product Version here.
Set a Detect Property here. You can use this detect property to specify a message to display like notifying the consumer that the current version will be uninstalled. However, it is not necessary to do this. I don't but I just wanted to point out that you can use this property to control the text on a particular dialog, for instance the welcome dialog.
It can take a little bit to better understand the upgrade process. MSDN has some great articles on the upgrades. When you have a chance do a search for MSDN major upgrade and also MSDN windows installer patches. It will help in the long run because you will better understand what options are available to you.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 06, 2015
07:18 AM
I just read your post again.
One thing to note is that for a major upgrade, which involves the uninstall process you desire, you MUST change the product code.
We see the message you indicated during internal testing because I do not alter the product code for each build, just at the start of the build cycle. So QA must manually uninstall the previous version in this case. However, they are required to test upgrade from a previous release where the package code has changed.
The configuration that you described is a minor upgrade scenario.
One thing to note is that for a major upgrade, which involves the uninstall process you desire, you MUST change the product code.
We see the message you indicated during internal testing because I do not alter the product code for each build, just at the start of the build cycle. So QA must manually uninstall the previous version in this case. However, they are required to test upgrade from a previous release where the package code has changed.
The configuration that you described is a minor upgrade scenario.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 06, 2015
10:43 AM
Ya, the problem i faced now is that user has to manually uninstall the previous version and then only proceed to install the new version.
This is to be avoided for user experience purposes.
I attempt to create a major upgrade, and somehow it is successful now where the previous version is uninstalled first and the new version will be installed.
Somehow the process is something like a normal new installation where i just need to double click the executable, and it will undergo a normal new installation.
When the new installation progress takes place, i noticed that the previous version is being uninstall silently without notifying the user.
I need to show user that the previous version will be uninstall via a message.
Does the Detect Property you mentioned is used for the message box I needed?
I need to do it with a InstallScript? or could you advise me a proper way of doing this?
This is to be avoided for user experience purposes.
I attempt to create a major upgrade, and somehow it is successful now where the previous version is uninstalled first and the new version will be installed.
Somehow the process is something like a normal new installation where i just need to double click the executable, and it will undergo a normal new installation.
When the new installation progress takes place, i noticed that the previous version is being uninstall silently without notifying the user.
I need to show user that the previous version will be uninstall via a message.
Does the Detect Property you mentioned is used for the message box I needed?
I need to do it with a InstallScript? or could you advise me a proper way of doing this?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 11, 2015
08:49 PM
I've got it to work where it detects any existing earlier version, it will uninstall it and install the new version.
Then what if it detects any existing advanced version, is it possible to make it to uninstall first and then install the new version using the Major Upgrade?
Which means i just want it to uninstall any existing version regardless of the version and the proceed with the new installation. is this possible?
Then what if it detects any existing advanced version, is it possible to make it to uninstall first and then install the new version using the Major Upgrade?
Which means i just want it to uninstall any existing version regardless of the version and the proceed with the new installation. is this possible?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 12, 2015
10:12 AM
It is certainly possible.
When you create a new MSI installer package in InstallShield a default entry is added to the upgrade table.
Under Media check 'Upgrades'
Look under 'Upgrade Windows Installer Setup'. Read through the Upgrades View help documentation on the right.
Look for the ISPreventDowngrade entry.
Note that if you look at the Advanced settings, this is a 'Detect Only' option. Basically it will detect if a version exists newer than the version displayed in the UI. If one does exist it sets the property ISFOUNDNEWERPRODUCTVERSION, what you do with this property is up to you. In the InstallExecuteSequence there is a custom action that uses this property, ISPreventDowngrade.
I think you can achieve what you want by deleting the ISPreventDowngrade entry in the Upgrades view. Hopefully the info above helps you better understand how all of this fits together. 🙂
When you create a new MSI installer package in InstallShield a default entry is added to the upgrade table.
Under Media check 'Upgrades'
Look under 'Upgrade Windows Installer Setup'. Read through the Upgrades View help documentation on the right.
Look for the ISPreventDowngrade entry.
Note that if you look at the Advanced settings, this is a 'Detect Only' option. Basically it will detect if a version exists newer than the version displayed in the UI. If one does exist it sets the property ISFOUNDNEWERPRODUCTVERSION, what you do with this property is up to you. In the InstallExecuteSequence there is a custom action that uses this property, ISPreventDowngrade.
I think you can achieve what you want by deleting the ISPreventDowngrade entry in the Upgrades view. Hopefully the info above helps you better understand how all of this fits together. 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 13, 2015
04:08 AM
DLee65 wrote:
It is certainly possible.
When you create a new MSI installer package in InstallShield a default entry is added to the upgrade table.
Under Media check 'Upgrades'
Look under 'Upgrade Windows Installer Setup'. Read through the Upgrades View help documentation on the right.
Look for the ISPreventDowngrade entry.
Note that if you look at the Advanced settings, this is a 'Detect Only' option. Basically it will detect if a version exists newer than the version displayed in the UI. If one does exist it sets the property ISFOUNDNEWERPRODUCTVERSION, what you do with this property is up to you. In the InstallExecuteSequence there is a custom action that uses this property, ISPreventDowngrade.
I think you can achieve what you want by deleting the ISPreventDowngrade entry in the Upgrades view. Hopefully the info above helps you better understand how all of this fits together. 🙂
Hi Lee,
So your saying without any upgrade entry in the Upgrades View, it will also uninstall the existing version automatically during the installation?
Or i still need to create new entry and get the right configuration to achieve the end result?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 13, 2015
06:51 AM
I would try creating an entry that leaves the max value empty. I am sure you require an entry in the Upgrade table to accomplish what you require.
Enter your minimum version, such as 1.0.0
Make sure that your upgrade code has not changed during the history of your product, if so add the previous upgrade codes that are eligible for upgrade.
Enter your minimum version, such as 1.0.0
Make sure that your upgrade code has not changed during the history of your product, if so add the previous upgrade codes that are eligible for upgrade.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 13, 2015
09:58 PM
DLee65 wrote:
I would try creating an entry that leaves the max value empty. I am sure you require an entry in the Upgrade table to accomplish what you require.
Enter your minimum version, such as 1.0.0
Make sure that your upgrade code has not changed during the history of your product, if so add the previous upgrade codes that are eligible for upgrade.
Then, what setting do i need to set for the Include Min/Max setting to Yes? or No?
What if i leave the minimum version to empty, this should means it includes any version before the current installation version?
And leaving the maximum version to empty, this should means it includes any version after the current installation version?
Isn't it?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 16, 2015
09:26 AM
Jim, was there any resolution to this? I am looking to perform the same actions as you are.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 26, 2016
07:26 AM
tjohnson1 wrote:
The second scenario is the correct setup but you made the mistake of editing the prevent downgrade item instead of creating a new major upgrade item. The prevent downgrade item is used to check for higher versions but since you changed it to earlier versions you are seeing the message when you normally wouldn't.
Prevent Downgrade item: http://helpnet.flexerasoftware.com/installshield20helplib/installshield20helplib_CSH.htm#helplibrary/PreventingDowngrades.htm
Creating a Major Upgrade: https://flexeracommunity.force.com/customer/articles/en_US/INFO/Q211822
Thank you tjohnson! I made the same mistake in initially having altered the ISPreventDowngrade entry and the links you provided helped me fix it and get back on the right track.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 26, 2016
01:15 PM
Well I had it working but managed to break it somehow...
The old version I have uninstalls (all files and shortcut removed) and the major upgrade installs fully, but in the add/remove programs (ARP) I still have an entry for the old version, which throws an error if you attempt to remove it from ARP.
Any ideas or should I start a different thread? (for clarity I am not Jim1236)
The old version I have uninstalls (all files and shortcut removed) and the major upgrade installs fully, but in the add/remove programs (ARP) I still have an entry for the old version, which throws an error if you attempt to remove it from ARP.
Any ideas or should I start a different thread? (for clarity I am not Jim1236)