[wix-users] Keep Harvested File on Uninstall

Rob Mensching rob at firegiant.com
Sun Jun 9 21:13:13 PDT 2019

If using heat.exe, an XSLT is how you solve this problem.

We (at FireGiant) developed a more advanced harvesting solution (https://www.firegiant.com/wix/wep-documentation/harvesting/). We very recently implemented a feature in that I believe does exactly what you want. Something like:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
    <ComponentGroup Id="ContentComponents">
      <Component Directory="ContentFolder" Permanent="yes">
        <fg:HarvestFolder Source="path\to\content\**" />

If you want to try it out, you could grab a trial license (https://www.firegiant.com/products/wix-expansion-pack/) and contact "support at firegiant dot com" to get access to the build with this additional functionality. Tell them I sent you. <smile/>

 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 Todd Hoatson via wix-users
Sent: Thursday, June 6, 2019 2:14 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Todd Hoatson <todd.hoatson at gmail.com>
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:

  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...

Todd Hoatson

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

More information about the wix-users mailing list