2

I have program on C#. I create VS Setup for this project. First of all i create setup for version 1.0.0, then i create for 1.0.1.

In Setup Properties I check DetectNewerInstalledVersion to false, and RemovePreviousVersion to true.

enter image description here

After install 1.0.0 I try to Upgrade to 1.0.1 by run setup v. 1.0.1. It`s finish success. But when I try to downgrade to 1.0.0 it`s install me to regedit 2 positions (I mean 1.0.0 and 1.0.1), and in application folder left 1.0.1, not 1.0.0. How to downgrade program from 1.0.1 to 1.0.0 in one step - install 1.0.0?

1 Answers1

2

There's no support for this in Visual Studio setups. I suspect that in most situations going back to an earlier version is unusual, so a manual uninstall of the newer one would be done first.

That means you need to use another tool that supports downgrades (I know WiX does) or edit the MSI file (with Orca from the Windows kit) as follows:

Open the MSI file and go to the Upgrade table. Delete the 1.0.1 (or whatever) is in the VersionMax column. Add a 0 to the VersionMin column, then save the file.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • Thank You, I got another idea. To make script on batch to perment remove files from folder, and connect it to UI, I mean a script will runing before install, but after click "start to install". – Vova Dowhanych Feb 22 '18 at 07:21
  • Ok, You was right, it\`s imposible to make it on VS setups.. I was try to make it on Events, but setup don`t come in them. – Vova Dowhanych Feb 22 '18 at 09:29