To create 'unique' filenames you could use ProductVersion or schedule custom action somewhere before InstallFiles and set the value of some property to a timestamp.
As far as CustomActionData, it is hard to suggest anything without seeing the code. The idea here is simple: - Define deferred custom action: <CustomAction Id="MyAction" Execute="deferred" ... /> - Define immediate custom action to set the value of the property to be passed to the script as CustomActionData property: <CustomAction Id="MyAction.SetProperty" Property="MyAction" Value="[INSTALLDIR]" .../> IMPORTANT: Property attribute's value of immediate action must match the Id attribute's value of deferred action. - Sequence custom actions so that immediate custom action is executed before deferred custom action. Regards, Alex -----Original Message----- From: RW [mailto:[EMAIL PROTECTED] Sent: Monday, February 04, 2008 3:26 PM To: wix-users@lists.sourceforge.net Cc: Alexander Shevchuk Subject: Re: [WiX-users] Vista security Thanks for the reply Alex. I have <CopyFile> working, but cannot find a way to create a 'unique' filename - hence looking into calling a VBS. The best I can come up with using <CopyFile> is appending the version number of the installer. E.g. myfile.1.2.1.1 This is better than not doing a backup, but in our previous (nsis) installer we created a filename with the date-time in it - if the installer was run multiple times, the user could revert the configuration file but it would always keep a backup history. I see there are MSI date and time properties, but as they are not 'filename friendly', I cannot append those. Likewise I don't see any unique install ID that could be used. On the security front... I read about the deferred constraint (after writing my message) and then managed to correctly get the script to run under the system credentials at the right place, however I found it impossible to pass a Property (the install location) into the VBS. The MSI Session appears to be lost. There is an example on the WiX tutorial website regarding passing the 'CustomActionData' property to a DLL for deferred CAs to get around this, but I couldn't work out how to do that to a VBS. I did try and create a Property and set it through a CA before chaining the VBS call, but nothing appeared to appear in VB - that is when I moved back to CopyFile! I'm having good fun learning all about MSI through WiX though. :) Thanks for your help, Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users