C# で記述された CustomAction があります。Wix インストーラー コードで DllEntry を 2 回呼び出したいです。どうすればこれを達成できますか?私はこれを次の方法で行っています。しかし、これは私のために働いています。これを行うための他の公正な方法はありますか?
C# コード:
[CumtomAction]
public static ActionResult SymbolicLink(Session session)
{
string s1=session.CustomActionData["value1"];
string s2=session.CustomActionData["value2"];
//mycode;
}
ウィックスコード:
<CustomAction Id="ca" Property="dllCA" Value="value1='one';value2='two'" />
<CustomAction Id="dllCA" BinaryKey="InstallerLibrary" DllEntry="SymbolicLink" Execute="deferred"/>
<CustomAction Id="ca1" Property="dllCA1" Value="value1='three';value2='four'" />
<CustomAction Id="dllCA1" BinaryKey="InstallerLibrary" DllEntry="SymbolicLink" Execute="deferred"/>
<InstallExecuteSequence>
<Custom Action="ca" Before="InstallFinalize"></Custom>
<Custom Action="dllCA" After="ca"></Custom>
<Custom Action="ca1" Before="InstallFinalize"></Custom>
<Custom Action="dllCA1" After="ca1"></Custom>
</InstallExecuteSequence>