[wix-users] Wix Bootstrapper WPF, C#, Update - The old bundle removes the new installed files with uninstall

Urška Šinkovec Palir urska.palir at gmail.com
Wed Sep 5 22:31:41 PDT 2018


When the update is performed, the bootstrapper engine detects the related
packages as the "operation: major update". It installs new ones and calls
the old package to remove itself.

If I let the engine decide what to do with the old bundle and packages,
files that came with the new installer will also be removed from the
computer. So I set the old bundle package's RequestState from "default" to
None. Result: The new files are present, the old bundle has been removed
and the new bundle is present in the "Programs and Features". It would have
worked for me until I uninstalled the newely installed bundle from my
computer. The files have been removed, but the shortcuts that came with the
first (and second) installers are not removed. Then I installed and
uninstalled the first version the shortcuts were removed properly.

Some other important information:

   - I'm harvesting the files with the Heat tool, so the GUID is new with
   each version, but the paths and names are very similar.
   - Each MSI package has a MajorUpgrade tag with a shedule of
   "afterInstallValidate"
   - The upgrade codes (packages and bundles) remain the same as in the
   previous version

The embedded version of the installer wires the DetectComplete,
PlanComplete, and ApplyComplete events (nothing more).

I also read about DetectUpgrade, DetectUpgradeBegin and
DetectUpgradeComplete. I implement the events, but the breakpoints were not
hit (and information was not seen in the logs). So the events were wired,
but not triggered (?).

Why does the old installer delete the newly installed files when it knows
that the "major upgrade" is being performed? Is it possible to give the
engine some sort of command what to do first? - First uninstalling and then
installing?


More information about the wix-users mailing list