2013-06-03 35 views

回答

1

您需要編寫自定義操作來複制文件。

<CustomAction Id="QtExecCopyPropertyFileCmd" Property="QtExec64CmdLine" Value="&quot;[SystemFolder]cmd.exe&quot; /c copy &quot;[INSTALL_DIR]\Test.txt&quot; &quot;[BKP_DIR]\Test.txt&quot;"/> 
<CustomAction Id="QtExecCopyPropertyFile" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="immediate" Return="check"/> 

檢查先前的設置是否安裝或未使用升級屬性。

<Upgrade Id="{YOUR-GUID-HERE}"> 
    <UpgradeVersion Property="PREVIOUSFOUND" Minimum="1.0.0" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="no" /> 
</Upgrade> 
    <Property Id="PREVIOUSFOUND" Secure="yes" /> 

在安裝執行順序中調用自定義操作。它只會複製升級文件。

<Custom Action="QtExecCopyPropertyFileCmd" After="AppSearch">(NOT Installed) AND (PREVIOUSFOUND&lt;&gt;"")</Custom> 
<Custom Action="QtExecCopyPropertyFile" After="QtExecCopyPropertyFileCmd">(NOT Installed) AND (PREVIOUSFOUND&lt;&gt;"")</Custom> 
相關問題