我有一個自定義操作WiX。回滾自定義操作時被取消安裝
<CustomAction Id="myActionId" BinaryKey="myAction" DllEntry="MySimpleAction" Execute="immediate" Return="check" />
<InstallExecuteSequence>
<Custom Action="myActionId" After="InstallInitialize">CHECKBOXCOPYPROP=1</Custom>
</InstallExecuteSequence>
我的自定義操作做備份和解決數據庫。我需要在取消安裝時執行回滾(drop database)。 我做了:
<CustomAction Id="myActionId" BinaryKey="myAction" DllEntry="MySimpleAction" Execute="immediate" Return="check" />
<CustomAction Id="myActionRollbackId" BinaryKey="myActionRollback" DllEntry="MySimpleAction" Execute="rollback" Return="check" />
<InstallExecuteSequence>
<Custom Action="myActionId" After="InstallInitialize">CHECKBOXCOPYPROP=1</Custom>
<Custom Action="myActionRollbackId" Before="myActionId">CHECKBOXCOPYPROP=1</Custom>
</InstallExecuteSequence>
但是我有一個錯誤。
如果我這樣做:
<CustomAction Id="myActionId" BinaryKey="myAction" DllEntry="MySimpleAction" Execute="immediate" Return="check" />
<CustomAction Id="myActionRollbackId" BinaryKey="myActionRollback" DllEntry="MySimpleAction" Execute="immediate" Return="check" />
<InstallExecuteSequence>
<Custom Action="myActionId" After="InstallInitialize">CHECKBOXCOPYPROP=1</Custom>
<Custom Action="myActionRollbackId" After="myActionId">CHECKBOXCOPYPROP=1</Custom>
</InstallExecuteSequence>
我的自定義操作myActionRollbackId作品。
如何在取消安裝時運行回滾? 有人可以幫助我嗎?
如果對CustomAction Id =「myActionId」的Execute ='deferred'我對此自定義操作有錯誤。 – kenai
什麼樣的錯誤?你能發佈一個摘錄從詳細的日誌文件嗎? –