[wix-users] Keep Harvested File on Uninstall

Christopher Painter chrpai at iswix.com
Thu Jun 6 15:18:31 PDT 2019


You'd have to transform the harvested wix  before building.

One thought would be to zip all of that up during your build and just static author the zip into the MSI.  Then in your application (startup perhaps) manage extracting the zip to a directory that the user could then customize.  Since MSI didn't install the extracted files it would be out of scope user data and it wouldn't get removed.

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Todd Hoatson via wix-users <wix-users at lists.wixtoolset.org>
Sent: Thursday, June 6, 2019 4:14 PM
To: WiX Toolset Users Mailing List
Cc: Todd Hoatson
Subject: [wix-users] Keep Harvested File on Uninstall

Hi all,
  our installer installs a pre-set data folder for the user's data, which
includes some default style sheets & settings of various kinds.  We harvest
these files using the heat utility and then reference the component group
in our main WiX file.

  On uninstall, we don't want any files in the data folder to be
uninstalled.  The user may simply be uninstalling & reinstalling to correct
some other problem, and then they would lose all their settings.

  Is there a way to mark as "permanent" these components or a component
group that is the result of a harvesting operation?

  I saw this StackOverflow article:
https://stackoverflow.com/questions/22418172/wix-keep-file-harvested-by-heat-on-uninstall-or-upgrade


  Is the use of an xslt file the only way to do this?  Or is it possible to
tag the component / component group as permanent within my main WiX code?

  I see that heat accepts a "template"n argument, but I don't know where to
look for more information about this or if it would even help...

thanks,
Todd Hoatson

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



More information about the wix-users mailing list