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"];