[wix-users] CopyFile add Date to DestinationName
Joel Budreau
joel.budreau at gmail.com
Thu Nov 5 12:57:23 PST 2015
You could make use of the MSI "Date" property, but you'd probably need a
custom action to modify the string since it's populated in the format
"MM/DD/YYYY" -
https://msdn.microsoft.com/en-us/library/aa368261(v=vs.85).aspx
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Brian Enderle
Sent: Thursday, November 5, 2015 8:02 AM
To: WiX Users
Subject: [wix-users] CopyFile add Date to DestinationName
I am making a backup of a file when upgrading a product:
<DirectoryRef Id="CONFIGFOLDER">
<Component Id="BackupConfigFile"
Guid="DD561CA8-674D-4D52-840D-26A8575A3AFC">
<CopyFile Id="CopyConfigFile"
SourceDirectory="CONFIGFOLDER"
SourceName="config.xml"
DestinationDirectory="CONFIGFOLDER"
DestinationName="config.bak" />
</Component>
</DirectoryRef>
Is there a way I can add the current date (something like 20151105 or
11052015) to the DestinationName to end up file a file name like
"config_20151105.bak"
Brian
If you can't explain it simply, you don't understand it well enough. -
Albert Einstein
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/
More information about the wix-users
mailing list