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-added-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-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


---
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

Reply via email to