Your WiX has a MyFileId component that installs the file to APPLICATIONFOLDER. That's an installed file, just to get awy from the confusion of the word "copy".
You also have a component MyFileCopyId that is doing a CopyFile of something to APPLICATIONFOLDER, That says: <CopyFile Id="MyFileCopyId" FileId="MyFileId" DestinationDirectory="APPLICATIONFOLDER" /> which means copy the installed "MyFileId" to APPLICATIONFOLDER, and it looks like MyFileId is that same file, MyFileId, that is already installed to APPLICATIONFOLDER. As far as I can see, you are really installing that file then trying to copy it to the same location. It's a feature of Windows Installer that its resiliency will attempt to restore a broken installation, and includes re-installing them from the original install location. --------------- Phil Wilson On Mon, Oct 13, 2014 at 12:09 AM, Fabrice MAUPIN <fmau...@iback.fr> wrote: > Hi, > > The file is not copied in the same location ! > > The file is copied from "app/resources" to the root of APPLICATION FOLDER. > > The structure of the package after the install : > > APPLICATION FOLDER > | APP > | Resources > My file > | RUNTIME > > " Also, if "the folder which contains this file can be deleted." means that > you are going to remove the files and folder that were installed directly by > the install (not the copyfile) then you have an issue there because MSI > resiliency repair will attempt to restore it." > > It means that it is not possible to remove files or folders (installing by > MSI) after install (else restore them by MSI) ? > > ------------- > Fabrice > > -----Message d'origine----- > De : Phil Wilson [mailto:phildgwil...@gmail.com] > Envoyé : vendredi 10 octobre 2014 18:33 > À : General discussion about the WiX toolset. > Objet : Re: [WiX-users] How to hide a file in WXS configuration file ? > > I think the point Michael is making is that during the install you are > copying a file to APPLICATIONFOLDER as part of the "normal" MSI install > process, and then you're doing a separate copyfile of that same file to the > same location with the same name. This can't be right, so maybe you've just > made a typo error, but in any case the WiX docs say that a copyfile of the > same file to the same location with the same name doesn't do anything. So > presumably you want to copy it to some other location? > > Also, if "the folder which contains this file can be deleted." means that you > are going to remove the files and folder that were installed directly by the > install (not the copyfile) then you have an issue there because MSI > resiliency repair will attempt to restore it. > --------------- > Phil Wilson > > > On Fri, Oct 10, 2014 at 12:19 AM, Fabrice MAUPIN <fmau...@iback.fr> wrote: >> Hi, >> >> For information, I use WiX 3.8. >> >> "...copying a file that you're already installing, but I've never >> found a good reason to use it in this way" >> >> Yes I've a good reason : I want install certain files to the root of >> the application folder for particular functional use-cases and one of >> the ways to do that is to package this files into my JavaFX >> Application. >> >> Once the copied file, the folder which contains this file can be deleted. >> >> Fabrice >> >> -----Message d'origine----- >> De : Michael Turner [mailto:mcturner...@gmail.com] Envoyé : jeudi 9 >> octobre 2014 17:59 À : wix-users@lists.sourceforge.net Objet : Re: >> [WiX-users] How to hide a file in WXS configuration file ? >> >> >> 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-adde >> d-to-w >> ix-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-authori >> ng/ .) >> >> 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-h >> ide-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 >> >> >> --- >> Ce courrier électronique ne contient aucun virus ou logiciel malveillant >> parce que la protection avast! Antivirus est active. >> http://www.avast.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 > > ------------------------------------------------------------------------------ > 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://p.sf.net/sfu/Zoho _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > --- > Ce courrier électronique ne contient aucun virus ou logiciel malveillant > parce que la protection avast! Antivirus est active. > http://www.avast.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://p.sf.net/sfu/Zoho > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ 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://p.sf.net/sfu/Zoho _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users