Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiX Installer: How to switch to repair-mode if already installed?

I am new to WiX 3.0 and writing my first installer based on WiX (coming from Wise).

If the product is already installed (in the current version), I want the installer to switch to "repair"-mode automatically. It should behave exactly like as if I would have clicked "repair" in the Windows software dialog.

It must behave like this to fit in the overall installation process of the system.

I read the documentation but can't get hold of the problem...

like image 752
Stiefel Avatar asked Jul 26 '10 12:07

Stiefel


People also ask

How do I run as administrator in WiX Installer?

Setup tab > Run after execution input: your msi file name. Advanced tab > Mark Request Administrative access option checkbox.

How does WiX Installer work?

The WiX tools follow the traditional compile and link model used to create executables from source code. At build time, the WiX source files are validated against the core WiX schema, then processed by a preprocessor, compiler, and linker to create the final result.

Is WiX Installer free?

Download. You can download the WiX toolset for free.


1 Answers

You can use the Installed property to conditionalize a SetProperty element for REINSTALL and REINSTALLMODE properties. Be careful to test upgrades to ensure that you add the other parts of the condition (REMOVE<>"ALL") so that the upgrade of the old product stays an uninstall and doesn't flip to repair. :)

like image 186
Rob Mensching Avatar answered Oct 05 '22 22:10

Rob Mensching