6
我讀過How do I pass msiexec properties to a WiX C# custom action?,但這並沒有回答我的問題,或者我只是沒有看到我做錯了什麼。 我的安裝包無法安裝,並且日誌說我的屬性在自定義操作集合中找不到。我的代碼是:無法將屬性傳遞給WiX自定義動作
<CustomAction Id="SetCustomActionDataValue" Return="check" Property="Itp.Configurator.WixCustomAction" Value="G=G2" />
<CustomAction Id="CreateDatabase" BinaryKey="Binary1" DllEntry="CreateDatabase" Execute="deferred" Return="check" />
<InstallExecuteSequence>
<Custom Action='SetCustomActionDataValue' After="InstallFiles"/>
<Custom Action='CreateDatabase' After="SetCustomActionDataValue">
NOT Installed AND NOT PATCH
</Custom>
</InstallExecuteSequence>
和代碼中的自定義動作是:
string Property1 = session.CustomActionData["G"];