WiX major upgrade doesn't complete installation until spawned

1k Views Asked by At

I created an installer based upon the code I found here. If a previous version of the app exists, I want the installer to delete it before installing the new one.

If it's a clean install, everything goes well.

If it's an upgrade, a weird thing happens. As expected, the old version is removed, the registry is changed, and shortcuts are placed on the desktop. Oddly, the primary file doesn't exist in the application folder when the installer completes.

Upon launch after an upgrade, a small installer message box pops up and states "Please wait while Windows configures -app name-..". After this quick message, the file exists as it should in the app folder, and the app launches.

Prior to launch though, it's not there. I even tried a reboot before launching the app to see if that would place the file if it's stuck in a some kind of cache.

Anyone ever see this behavior? It's a bit like this questiom, but it happens on every upgrade.

1

There are 1 best solutions below

5
On

Oddly, the primary file doesn't exist in the application folder when the installer completes.

This is a common problem with windows installer upgrades if components are not managed correctly. You'll typically see that the missing file re-appears if you launch the installer into maintenance mode from the control panel and do a "repair". In this case, windows repaired the application automatically when you launched it.

A few possible explanations of the top of my head:

  1. the new version of your installer installs this file in a component with a new GUID. This causes problems because Component GUIDs should remain stable.

  2. your installer installs multiple files per component. This causes problems because whether a component should be installed is determined by the keypath, and only one file can be the keypath. Stick to one file per component.

  3. The "new version" of the file actually has a lower version number. Such an "upgrade" doesn't work correctly.