Create 2 components, 1 component for each text file. Give them * guids. Use
the same <File> element's Name attribute in both components but point the
<File> Source attributes at different versions of the text file in each
component. Add a condition to each component: one component's condition
should be true if the box was ticked and the other component's condition
should be true if the box was not ticked (there will be a property bound to
the tick box that you can test). Add both components to the same feature.
When the installer runs, only 1 component will be installed.

There's no need to copy or rename the file.

-----Original Message-----
From: Matej Kurpel [mailto:mkur...@gmail.com] 
Sent: 07 December 2011 17:24
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Copy other file when checkbox is checked?

Hello all,
I got a task of modifying an existing WiX installer. The files are 
copied in batches (File elements inside DirectoryRef elements) and one 
of these files (let's name it file.txt) should be modified if a checkbox 
was checked in one of the installer screens. I was able to create the 
checkbox but I was not able to figure out how to do this.
So I created another file (file2.txt) with the idea that the installer 
package will contain both of them and, if the checkbox was not checked, 
file.txt is copied, otherwise, file2.txt is copied (but it is renamed to 
file.txt once in destination). Is there a way of doing this? Can't seem 
to find the right wording for google... maybe someone knows the answer, 
please?
Thank you for all replies,

M. Kurpel

-----------------------------------------------------------------------------
-
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to