简体   繁体   中英

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...

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. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM