I've delivered version 1.0 of my software with a WiX-generated installer, and now I want to deliver/disseminate version 1.1. If possible I would like to avoid the situation of telling people to remove 1.0 manually first before installing 1.1.
However, I've had to modify the InstallScope
, changing it from perUser
to perMachine
for various technical reasons. Not a big deal, except it makes upgrading a hassle.
What I'm seeing happen is the same thing that this post mentions, wherein even though you've done all the proper work to implement an upgrade, when it's done you see two different entries on the list of installed programs, one is 1.0 and the other is 1.1. And this is causing problems in the software.
So it would appear that the basic "remove the previous version" logic doesn't work here, so I need some other method of having the previous version uninstalled. I tried to go down the path of firing off the proper msiexec /x
command remove the previous version via a ShellExecute CustomAction
, but unless I'm missing something there's no place in the sequence where this would work because you're firing off one msiexec
command in the middle of another running.
Then I stumbled across this page which details a little-documented method of "chaining" MSI's together:
setupbld.exe -out $(TargetDir)setup.exe -msu FirstInstaller.msi -msu SecondInstaller.msi -setup $(ProjectDir)setup.exe
Sounds great - all I need now is some MSI whose sole function is to remove version 1.0 and then I can chain that together with the old one.
Except I'm not finding a lot of documentation on how you could do that. In fact, since this could in theory potentially be used to remove software you didn't originally install, I'm not sure this is even technically possible for security reasons.
Does anyone know how to create a MSI using WiX whose sole purpose is to uninstall the software? Or am I attacking this problem completely wrong?