2

I have an application in VS 2015, and I am using Visual Studio Installer Projects to generate the installer. On each new version, I change the Version and the ProductCode, while the UpgradeCode remains the same, so that the installer replaces the old versions of the application previously installed in the machine. This works just right, nothing wrong here.

BUT, There are older versions of this application running on some of the clients' machines, and I know that the installer of those versions was made using InstallShield. The problem is that I can't make the new installer to replace those old versions, although I'm using the same UpgradeCode and the same Name... It just installs the new version but the old one remains on the machine.

What am I doing wrong? Any help is appreciated!

Asier Azkolain
  • 75
  • 1
  • 13
  • It might be worth you including the ProductCode, ProductVersion, PackageCode and UpgradeCode of all MSIs in your question. Also, state the values in your Upgrade table... – Captain_Planet Dec 02 '21 at 23:06
  • What is the PackageCode? I can't find it on Visual Studio Installer Projects – Asier Azkolain Dec 03 '21 at 08:15
  • It's in the Summary Information Stream. I'm not sure you can do it natively in VS (not that I've tried) - https://social.msdn.microsoft.com/Forums/vstudio/en-US/49086bd5-7f58-48ad-b9e5-c16c549b22db/how-to-update-quotpackage-codequot-in-msi-file-?forum=tfsbuild – Captain_Planet Dec 03 '21 at 08:29
  • You might want to use Orca (for simplicity) to get the functionality working, and then try and implement the changes via VS. You might ultimately need to use WiX, not sure... – Captain_Planet Dec 03 '21 at 08:30
  • You should create a list of the installed applications on machine with those installshield versions present. [See this answer](https://stackoverflow.com/questions/29937568/how-can-i-find-the-product-guid-of-an-installed-msi-setup/29937569#29937569). I would recommend you [run this script](https://github.com/glytzhkof/all/blob/master/MsiHtmlReport-Mini-V4.vbs). It will create a html table of the installed products. It takes a while to run. Then you can see if the upgrade codes are really the same, and what the other codes and details are for the products. – Stein Åsmul Dec 04 '21 at 14:26

1 Answers1

2

I struggled with this exact issue for a while when replacing an InstallShield project with a VS Installer project. The UpgradeCode was identical between the two & RemovePreviousVersions was True..

The thing that got me was the InstallAllUsers property. These need to be the same for both installer projects. If InstallShield was installed for all users, VS Installer cannot overwrite it if it only installs for the current user.

David
  • 36
  • 2
  • Thank you @David ! Your answer has solved my problem. I had everything under control: version number, product code, upgrade code, assambly code... But THAT was missing. I set InstallAllUsers to True, and now it works. The new installer replaces the old installshield-generated versions correctly. – Asier Azkolain Oct 27 '22 at 08:52