i am new to Wix toolsets. i have successfully made my first installer in Wix but now i am confused about my software updates which usually are minor.
in my installer i want to check if user have any older version installed then i want to show him three options ;
- Modify: which would install new version.
- Repair: which would repair previously installed product.
- Remove: which would remove the installed product.
for Modify i can simply show InstallReadyDlg as next dialog which would then uninstall previous version and install new one.
But i am unable to find out that how can i trigger uninstall or repair of previously installed version.
Any hint would be highly appreciated.
Note: i know how can i show these options and how to detect if user has any older version installed.
Best How To :
That's not the way things are usually done because:
Modify is universally understood in this context and dialog to mean adding or removing features.
You can't properly do an upgrade from a dialog of an already installed product that is going to be removed. In other words your plan most likely won't work because you'll need to browse to the new MSI (web site? CD?), then launch it from your modify dialog (how, when you have the current product dialog showing?) and then attempt to upgrade a product with a dialog showing.
So nobody does installs with that behavior, and nobody expects that non-standard behavior, and it has a good chance of not working.
Having said that, that's why you get modify/repair/remove for free from the built-in WiX UI dialogs that you just include, so there is nothing you need to do to get repair, remove, or modifying installed features to work. It's all there.
Installed products are upgraded with patches (for small fixes), and also major upgrades, where you just build a new MSI as a full new product and include a MajorUpgrade tag so that it will remove the older version if there is one installed. Just install the new product (from CD, web site or whatever) and it's always a fresh complete install that upgrades and removes any prior version because of that MajorUpgrade element.