Fabrice, The CopyFile element is kind of an oddball, particularly in the use-case where it points to another File in the same installer. Sure, the CopyFile element exists, and it supports copying a file that you're already installing, but I've never found a good reason to use it in this way; it might be useful for copying a file that's already on the destination machine (i.e., the syntax where you specify one or more Source* attributes), but that's about it. When you use the FileId="..." syntax, the way that it binds one component to another has some weird consequences. But if you're just trying to save space by not having to store the same file twice in the MSI, you can do that without CopyFile. As of WiX 3.5 (I think?), the WiX Linker does "smart cabbing": if it detects that two File elements are using the same physical source file, then it stores the file just once and then has both File elements point to it. http://robmensching.com/blog/posts/2007/6/1/quotsmart-cabbingquot-added-to-wix-toolset/
Anyway, if I understand you, you want to install the same file to two different places, with the Hidden flag set in one place but not in the other? (However, your code snippet is specifying APPLICATIONFOLDER twice, so maybe I misunderstand you.) This is one of the many things you can't do with CopyFile; you can't change file attributes during the copy. But thanks to "smart cabbing", you can just use two File elements, and as long as you're using WiX 3.5 or later, this won't make your MSI any larger. E.g., (In my example, I am leaving off unnecessary attributes, per http://www.joyofsetup.com/2009/12/31/simplifying-wix-component-authoring/ .) Regards, Mike Fabrice MAUPIN wrote > Hello everybody, > > This is an extract of my WXS configuration file : > > > <DirectoryRef Id="APPLICATIONFOLDER"> > > > <Component Id="MyFileId" Guid="." Win64="yes"> > > <File Id="MyFileId" Name="_dt.xsl" > Source="app\resources\_dt.xsl" KeyPath="yes" /> > > </Component> > > <Component Id="MyFileCopyId" Guid="." Win64="yes"> > > <CopyFile Id="MyFileCopyId" FileId="MyFileId" > DestinationDirectory="APPLICATIONFOLDER" /> > > > </Component> > > </DirectoryRef> > > > > <Feature Id="MyFeature"> > > <ComponentRef Id="MyFileId" /> > > <ComponentRef Id="MyFileCopyId" /> > > </Feature> > > I would like to hide the "_dt.xsl" file which was copied : is it possible > ? > > If yes, how ? > > Thanks you. > Fabrice -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-hide-a-file-in-WXS-configuration-file-tp7597186p7597195.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users