0

If I execute a Wix installer for first time it will install as expected.

If I re-run the installer it correctly enters maintenance mode (Repair/Change/Modify)

However if I re-compile the installer between the initial install and the re-run, it treats it as new installer. I have tried using the same Product Id but when the newly compiled installer is executed, I then get a message saying it has already been installed and must un-install the previous version.

As part of our development I am trying to resolve some issues with the Maintenance UI and don't want to have to run the installer twice every time I wish to debug the maintenance wizard. I would like the re-compiled installer to be treated as if it were the original installer.

Thanks for any pointers you may be able to throw at me, or other suitable resource

ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
Dave
  • 1
  • Why not just activate the maintenance mode from the control panel? (Select to change\uninstall from the control panel without using a re-compiled installer) – TeaHoney Mar 06 '17 at 14:52

1 Answers1

1

Technically this is not something that you should do. By rebuilding, you are altering the package, which means it is supposed to have a new package code. When it has a new package code, but matching product code and version, it is a small update. You can skip the uninstall and install by instead performing a reinstall via msiexec /fvomus your.msi or msiexec /i your.msi REINSTALL=ALL REINSTALLMODE=vomus.

As another approach, if what you are testing doesn't depend heavily on machine state, you can tweak some of the entry conditions for the maintenance UI such that it occurs on a first-time installation, and ensure that the package cannot install. This puts you in a simpler reproduction loop, but will require transplanting your finished code back to the real scenario.

Michael Urman
  • 15,737
  • 2
  • 28
  • 44