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

Rob Mensching rob at firegiant.com
Wed Sep 5 23:40:48 PDT 2018


Sounds like you are violating the Component Rules: http://robmensching.com/blog/posts/2003/10/18/component-rules-101/
_____________________________________________________________
 Short replies here. Complete answers over there: http://www.firegiant.com/


-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Urška Šinkovec Palir via wix-users
Sent: Wednesday, September 5, 2018 10:32 PM
To: wix-users at lists.wixtoolset.org
Cc: Urška Šinkovec Palir <urska.palir at gmail.com>
Subject: [wix-users] Wix Bootstrapper WPF, C#, Update - The old bundle removes the new installed files with uninstall

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?

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list