如何将参数传递给自定义 *** 作?

如何将参数传递给自定义 *** 作?,第1张

如何将参数传递给自定义 *** 作

注意,您

Value
以错误的方式使用属性

…此属性必须与Property属性一起使用才能设置属性…
Source


基于在C#中创建WiX自定义 *** 作和传递参数一文,您应该:

  1. 创建具有所需值的属性:

    <Property Id="InstallDir" Value="someDefaultValue" />

  2. 创建自定义 *** 作以设置

    InstallDir
    属性:

    <CustomAction Id="SetDirProp" Property="InstallDir" Value="[TARGETDIR]" />
  3. 创建自定义 *** 作:

    <CustomAction Id="SetMAWPrefferences" Return="check" Execute="commit" BinaryKey="importExportBinary" DllEntry="YourCustomAction" />
  4. 计划自定义 *** 作以在安装过程中执行:

    <InstallExecuteSequence><Custom Action="SetDirProp" After="CostFinalize" /><Custom Action="SetMAWPreferences" ... />...



欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/4900234.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-12
下一篇 2022-11-12

发表评论

登录后才能评论

评论列表(0条)

保存