Upgrades not working


I have a implementation with a bundle.wxs that chains my MSI and three third party MSIs. It appears to be working correctly for installing, but when I attempt an upgrade installation over a previous install, after the upgrade appears to be successful, a second WixWPF window pops up with "Install" and "Quit" buttons highlighted.

From the log, it appears that the previous installer is being called with the command line parameters:

"-uninstall -quiet -burn.related.upgrade"

On the second WixWPF window, if I press "Quit", it goes away, the upgrade installation finishes, and I have two entries in the Programs and Features control panel for the same installation (with different versions).

Is there anything I can do via configuration to make this work correctly?

file attachments


tpalacino wrote May 27, 2014 at 4:37 PM

Can you share the version of the Wix Toolset and Visual Studio that you're using?

bobhodge wrote May 27, 2014 at 10:53 PM

I'm sorry, I should have thought to do that. It's wix 3.8 and Visual Studio 2013.

wrote May 28, 2014 at 2:05 AM

bobhodge wrote May 28, 2014 at 2:05 AM

I created a very minimal project that illustrates the problem I'm having, and I'm attaching to this comment.

The solution contains a tiny application, an MSI project, and the bootstrapper and bootstrapper UI projects.

I used a "bind" for the fileversion of the MSI and the bundle, so you can change the version in the application's AssemblyInfo.cs file, build the exe, the msi, and the bundle, and see the results of an upgrade installation.

Let me know if there's anything else I can do to help.

Thanks very much.

tpalacino wrote May 30, 2014 at 4:50 AM

There might be some way to automagically handle this scenario in the communication layer between the engine and the UI, but in the mean time you can take a look at what the WixWPF installer does.

Line 135 of MainWindow.xaml.cs in the "OnDetectComplete" method checks the relation type and install state. Only when the relation type is "Upgrade" and the application is not installed it performs an uninstall. The old version

Lines 89-92 of MainWindow.xaml.cs in the "" method check This particular scenario (upgrade causing the uninstall of this version) is also given special handling so that after the uninstall is complete, the bootstrapper is closed

If you did that the window would still be presented but there would be no allowed interaction. .

tpalacino wrote May 30, 2014 at 4:53 AM

Sorry that previous comment is broken...I accidentally hit Ctrl+S instead of Ctrl+X when I was restructuring for clarity. Most of the information is there. If it doesn't make sense let me know and I can re-write the comment.

bobhodge wrote May 30, 2014 at 11:47 AM

Thanks for the reply. I believe I understand the comment.

I appreciate your effort.

djarvis8 wrote Oct 1, 2015 at 8:04 PM

I am seeing this same behavior, the MainWindow.xaml.cs code isn't handling the command-line -uninstall -quiet parameters and instead is showing the UI.

Is there any updated code that handles this?

If I go ahead and manually hit "uninstall" then "quit" in the second UI window that comes up, pretending that it would have done this automatically and with no UI, then the end result does look to be correct - an upgrade.