Configuring InstallShield LE to remove previous versions built using Visual Studio Setup Projects
Asked Answered
H

4

11

Using Visual Studio 2010, I would like to switch over to using InstallShield LE instead of the Visual Studio Setup Project.

In the Setup Project, an option RemovePreviousVersions existed which was great for making an installer that would essentially do an in-place upgrade when a new version is released.

Now with InstallShield LE, I've updated the version and generated a new ProductCode, but after running the installer, the previous version is still present.

What do I need to do so that the InstallShield-built project can remove the previous version which was built with the VS Setup Project?

Hangnail answered 22/6, 2011 at 22:40 Comment(0)
F
8

You can try this:

  • open your old MSI with Orca and get its UpgradeCode from Property table
  • in your InstallShield LE project go to "General Information" in solution explorer
  • make sure that the "Upgrade Code" field is set to your old MSI UpgradeCode

You should also make sure that ALLUSERS property has the same value for both versions (it's the same approach). You can read more about upgrades here: http://msdn.microsoft.com/en-us/library/aa369786(VS.85).aspx

Fidge answered 23/6, 2011 at 6:17 Comment(7)
Is this the same UpgradeCode shown in the properties for the VS Setup Project?Hangnail
For the record, it is the same UpgradeCode shown in VS Setup Project properties. Orca is a big pain to install because I had to download a 1GB SDK and yank just the Orca installation from it. However, it did reveal that the old installation used an ALLUSERS setting of 2 whereas the new installation was using 1. (1 is per-machine, 2 is per-user or per-machine, and no value is per-user.)Hangnail
Unfortunately this still is not working. Installing version A (VS Setup) then installing version B (InstallShield LE) still results in two versions being installed at the same time.Hangnail
Success! The last missing step was to create an entry in the Upgrade Paths portion of InstallShield LE's "Organize Your Setup" section. Right-click on Upgrade Paths and select New Upgrade Path. A dialog asking to open a file will appear. Locate a previous version .MSI file and open it. It will automatically import the Upgrade Code and provide fields where you can specify what previous version range should be replaced with the new installer. Without this upgrade path, simply having the same UpgradeCode will not work.Hangnail
@Hangnail I have a similiar problem, I keep getting "Another version of this product is already installed...", I've incremented the Product Version on the General Information tab and I've created an Upgrade Path in the manner you specified above. Are there any other settings I should be changing?Mary
@Harikawashi As @Fidge says you need to change the product code in addition to incrementing the product version. Generally if you change the product version in your setup project, it will prompt you asking if you want to generate a new product code. In Installshield LE, there is a button on the Product Code field which will generate a new code when you click it. If you're not prompted to change it after incrementing the version, just click it and you should be set.Hangnail
@Fidge @Hangnail I must be missing something, because changing the Product Code leaves me with two seperate installs. This is also the way it is described in the InstallShield Express manual.Mary
K
42

This drove me crazy when I first started with a project in Visual 2012. I kept getting duplicate copies in the add/remove programs, and the old version wasn't updated. Here's what I found I needed to do.

Under The Upgrade Paths, create a new path. Leave the min version blank (unless you need it), include min version yes, Max version should be set to the version YOU ARE INSTALLING NOW. Include max version to yes.

Each time you are installing an update, advance the Product version in the General Information section. Click on a new Product Code in the General Information Section DO NOT CHANGE the upgrade code

Go back to the upgrade path, and set the Max version to the same version you are deploying now. This was key to getting this working for me.

This process uninstalls previous version, and installs the latest. No duplicates in add/remove programs.

Hope this helps.

Karlene answered 25/4, 2013 at 18:40 Comment(2)
Is it possible to give the user an option to either do an upgrade or reinstall the whole application completely(thus removing all the database and settings file). I am using Install Shield LE free versionBorges
I'm having trouble following this. I can't find my msi file anywhere on my dev machineGrateful
F
8

You can try this:

  • open your old MSI with Orca and get its UpgradeCode from Property table
  • in your InstallShield LE project go to "General Information" in solution explorer
  • make sure that the "Upgrade Code" field is set to your old MSI UpgradeCode

You should also make sure that ALLUSERS property has the same value for both versions (it's the same approach). You can read more about upgrades here: http://msdn.microsoft.com/en-us/library/aa369786(VS.85).aspx

Fidge answered 23/6, 2011 at 6:17 Comment(7)
Is this the same UpgradeCode shown in the properties for the VS Setup Project?Hangnail
For the record, it is the same UpgradeCode shown in VS Setup Project properties. Orca is a big pain to install because I had to download a 1GB SDK and yank just the Orca installation from it. However, it did reveal that the old installation used an ALLUSERS setting of 2 whereas the new installation was using 1. (1 is per-machine, 2 is per-user or per-machine, and no value is per-user.)Hangnail
Unfortunately this still is not working. Installing version A (VS Setup) then installing version B (InstallShield LE) still results in two versions being installed at the same time.Hangnail
Success! The last missing step was to create an entry in the Upgrade Paths portion of InstallShield LE's "Organize Your Setup" section. Right-click on Upgrade Paths and select New Upgrade Path. A dialog asking to open a file will appear. Locate a previous version .MSI file and open it. It will automatically import the Upgrade Code and provide fields where you can specify what previous version range should be replaced with the new installer. Without this upgrade path, simply having the same UpgradeCode will not work.Hangnail
@Hangnail I have a similiar problem, I keep getting "Another version of this product is already installed...", I've incremented the Product Version on the General Information tab and I've created an Upgrade Path in the manner you specified above. Are there any other settings I should be changing?Mary
@Harikawashi As @Fidge says you need to change the product code in addition to incrementing the product version. Generally if you change the product version in your setup project, it will prompt you asking if you want to generate a new product code. In Installshield LE, there is a button on the Product Code field which will generate a new code when you click it. If you're not prompted to change it after incrementing the version, just click it and you should be set.Hangnail
@Fidge @Hangnail I must be missing something, because changing the Product Code leaves me with two seperate installs. This is also the way it is described in the InstallShield Express manual.Mary
I
4

user2321103's answer is excellent, creating the new upgrade entry in Upgrade Paths is the key thing. It is unfortunate that this option is hidden away as it is required in order to produce what most people would naturally expect to be the normal default behaviour for a setup program.

The reason for this new answer is that I found that I could set the Max Version in the Upgrade Entry to a higher number rather than the current version. This means I won't have to remember to update this for every new release. My current version is 2.1.8 so I set Max Version to 2.1.9999. In the unlikely event that I might want different behaviour in some future release I can up my version to 2.2.x

The Microsoft Setup Project would automatically update the Product Code whenever you altered the version number, but Installshield LE doesn't, so will need to remember to do this every time.

As the other answers state, it is important that the Upgrade Entry uses the Upgrade code from the previous installed versions. I haven't tried this, but presumably if for some reason you have more than one previous version with different upgrade codes, then you can create a separate upgrade entry for each.

I don't understand why you can't just set both Include Min Version and Include Max Version to No, but this doesn't seem to work. I have not tried every combination of these different parameters but as stated in the other answer the following settings seem to do the trick:

  • Min Version: blank
  • Include Min Version: Yes
  • Max Version: >= current version
  • Include Max Version: Yes

It also seems to be important not to change Lang Search Criterion to Exclude. I have also set Ignore remove failure to Yes. I have Migrate Feature States set to No, but I don't think this is relevant for the LE edition anyway.

Internecine answered 16/12, 2014 at 11:27 Comment(1)
Iterating towards progress -- I have an answer derived from this which does not require setting a Max Version.Sergius
S
0

If I can throw one more answer in the hat, I was able to make an upgrade path that does not require setting/updating a specific Upgrade Code, Min or Max Version based on the generic ISPreventDowngrade upgrade path. According to the cautionary note in the Max Version description, You must specify a value for at least one of the version settings: Min Version, Max Version, or both. So I set the Max version to a generic placeholder. This done, I am not required to set a Max Version. So my configuration is as follows:

  • Upgrade Code: {00000000-0000-0000-0000-000000000000} (generic placeholder that will be replaced with current installer's upgrade code)
  • Min Version: blank
  • Include Min Version: No
  • Max Version: ***ALL_VERSIONS*** (version placeholder)
  • Include Max Version: Yes

All other fields I left unchanged. See http://helpnet.flexerasoftware.com/installshield23helplib/helplibrary/PreventingDowngrades.htm for more information, but beware the typos. Both the placeholders above are mistyped; I obtained them from the data used in the ISPreventDowngrade upgrade path.

Sergius answered 28/3, 2018 at 15:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.