- 即时的CA 不可回滚,但是能直接在c#里用session["属性名称"] 访问 上下文的属性
- 如果是延迟执行的CA, 需要通过 customActionData
<!-- id需要一样 -->
<CustomAction id="xxx" Execute="deferred" ..../>
<Property Id="xxx" Value="Arg1=111;Arg2=222;Arg3=333;Arg4=[property]" />
CustomActionData data = session.CustomActionData;
string arg1 = data["Arg1"];
string arg2 = data["Arg2"];
string arg3 = data["Arg3"];
string arg4 = session.Format(data["Arg4"]); //Arg4=[属性] 所以需要这样写
- 即时的CA也能用CustomActionData, xml中写方和延迟CA一样,但c#里写法不一样
CustomActionData data = new CustomActionData(session["MyCustomAction"]);
.
.
.
标签:传参,string,session,c#,CA,CustomActionData,data,wix
From: https://www.cnblogs.com/nocanstillbb/p/17623771.html