I've an upgrade scenario where I'm copying one file from the version 1 to 
version 2. 
Product gets installed in the PROGRAMFILES\Product\VersionNo folder so both of 
the version will have different directories and I'm copying the config file 
from product\V1 to Product\V2
for that I created a wxs file like this.

<Property Id="EXISTINGINSTALLPATH">
<!-- search for the existing component -->
<ComponentSearch Id=".." Guid=".."Type="file"/>
</Property>
<Component Id="CopyConfig" Guid="3392C1A2-2F93-4ee1-9DA7-2F610B646FDB" 
Location="local" DiskId="1">
            <Condition>
              MAJOR_UPGRADE
            </Condition>
            <CopyFile Id="ConfigFileCopy" SourceName="FileName.Config"
          SourceProperty="OLD_CONFIG_INSTALLPATH"  
DestinationProperty="TARGETDIR"/>
          </Component>
<Component Id="Config" Guid="84649C50-015B-42AE-8944-C2490F8521BC" 
Location="local" DiskId="1">
            <Condition>
              NOT MAJOR_UPGRADE
            </Condition>
            <File Id="ConfigFile" 
            Name="fn.cfg" 
            LongName="FileName.Config" 
            KeyPath="yes" 
            src="$(var.InstallBinDir)\FileName.Config">                
              </File>
            </Component>

<
<Feature Id="SomeId" 
                    Title="Complete" 
                    Description="Description" 
                    Level="1" 
                    InstallDefault="local" 
                    TypicalDefault="install" 
                    AllowAdvertise="no">
            <ComponentRef Id="CopyConfig" />
            <ComponentRef Id="Config" />
</Feature>
  
<InstallExecuteSequence>
...
<FindRelatedProducts />
...
<RemoveExistingProducts After="InstallFinalize" />
</InstallExecuteSequence>

Is this the correct way to copy the file ?
All the properties are set correctly I can see their correct value in the log 
but it doesn't copy the file from source to destination neither do I get any 
error.





Regards
Sandeep

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to