[wix-users] Custom action to backup folder before install

Carlos Sosa carlos.sosa.us at outlook.com
Tue Oct 18 12:50:52 PDT 2016


Because the INSTALLFOLDER contains a database that has been modified and I
need to keep.
I was able to do this using a .bat file

Thank you.


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Wheeler, Blaine (DSHS/DCS)
Sent: Tuesday, October 18, 2016 8:56 AM
To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Custom action to backup folder before install

Why?  The installer service creates a restore point and also makes a
roll-back source so it can recover from a failed or cancelled installation.
At the end of the successful installation the roll-back is deleted.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Carlos Sosa
Sent: Monday, October 17, 2016 2:36 PM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Custom action to backup folder before install


Hello I need to back up the INSTALLFOLDER before upgrade/install.
I'm using a custom action as follows:

<InstallExecuteSequence>
    <Custom Action="BackupDB" After="InstallInitialize" />
</InstallExecuteSequence>


But I cannot seem to be able to define the custom action appropriately

<Fragment>

   <CustomAction Id='BackupDB'
                 BinaryKey='FooBinary'
                 DllEntry='FooEntryPoint'
                 Execute='immediate'
                 Return='check'>


    <CopyFile Id="SomeId" SourceProperty="SOURCEDIRECTORY"
      DestinationDirectory="INSTALLFOLDER" SourceName="*" />


   </CustomAction>



  </Fragment>


Using Visual Studio 2015 and Wix 3.1
Any help is appreciated.
Regards

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

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



More information about the wix-users mailing list