0
我必須在卸載時靜靜地運行一些cmd行。我試圖使用WixSilentExec,但它不起作用。問題是什麼 ?WixSilentExec不起作用
<Property Id="WixSilentExecCmdLine" Value='cmd /C "rmdir /s/q [DataBaseDir]"' Hidden="yes"/>
<CustomAction Id="RemoveDataDir" BinaryKey="WixCA" DllEntry="WixSilentExec" Execute="immediate" Return="ignore"/>
<InstallExecuteSequence>
<Custom Action="RemoveDataDir" Before="RemoveFiles">DELETEDATADIR="1" OR FORCEDELETE="1") AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
</InstallExecuteSequence>
<Directory Id="DataBaseDir" Name="$(var.DataBaseDirName)">
<Component Id="DataBaseDir.dir" Guid="*">
<CreateFolder/>
</Component>
</Directory>
您是否嘗試過無條件地運行自定義操作,以檢測問題是在操作調用還是其條件?您缺少'('在條件開始處'DELETEDATADIR =「1」或FORCEDELETE =「1」)'=>'(DELETEDATADIR =「1」或FORCEDELETE =「1」)' – Mischo5500
共享自己的答案。 –