Hi,
I have a problem with a property, used in a CopyFile element, which either 
should contain a complete subdirectory
path, or be empty. I guess my problem has a solution, but I don’t know how to 
do it.
Description to follow.

If application XXX is installed, the environmental parameter XXX_HOME will be 
defined to a root directory, e.g.
XXX_HOME = "C:\XXX\sub"

When installing my application, I want to copy some files to the directory 
"C:\XXX\sub\lib\knowledge\", or
"[XXXHOME]\lib\knowledge\", provided application XXX is installed (symbol 
XXX_HOME exists).

I've tried the following customer actions:

      <InstallExecuteSequence>
         <Custom Action='SETXXXHOME' After='AppSearch'/>
         <Custom Action='SETXXXKNOWLEDGE' After='AppSearch'/>
      </InstallExecuteSequence>

    <CustomAction Id="SETXXXHOME" Property="XXXHOME" Value="[%XXX_HOME]" 
Return="check" Execute="immediate" />
    <CustomAction Id="SETXXXKNOWLEDGE" Property="XXXKnowledgeCat" 
Value="[XXXHOME]\lib\knowledge\" Return="check"  Execute="immediate" />

in order to use the subdirectory property XXXKnowledgeCat in a CopyFile element:

            <File Id='ZZZ.KM' Name='ZZZ.KM' KeyPath="yes" DiskId='1' 
Source='km_files\ZZZ.KM' >
              <CopyFile Id="cfZZZ.KM"  DestinationProperty="XXXKnowledgeCat" />
            </File>

This works fine, if application XXX was installed, but if not, property XXXHOME 
will be empty (or does not exist),
while property XXXKnowledgeCat will be defined as "\lib\knowledge\", and that 
will, of course, not do in the CopyFile
element. I would like the property XXXKnowledgeCat to be empty, causing the 
CopyFile element not to have any effect,
when application XXX was not installed to the target machine.

How could this be accomplished?

Med vänlig hälsning/Regards/さようなら
Einar Lindahl
NASDAQ OMX
Analyst/Programmer Sr Spec. (Dr.Eng.)
Global Software Development
CLICK, SECUR & EXIGO

Direct: +46 8 405 6510
Mobile (or Cell): +46 73 449 6510
Fax: +46 8 405 6001
Visitors and deliveries: Tullvaktsvägen 15
SE-105 78  Stockholm, SWEDEN
einar.lind...@nasdaqomx.com<mailto:einar.lind...@nasdaqomx.com>
www.nasdaqomx.com<http://www.nasdaqomx.com/>

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to