如何在执行引导程序期间在 Wix 包中设置 DisableModify 属性

How to set DisableModify attribute in Wix bundle during execution of bootstrapper

我正在开发产品引导程序。我需要在 运行 时间内动态更改 DisableModify 属性的值。我没有在网上看到任何适当的文档或答案。我试过声明变量并使用它,但没有成功。我粘贴了 wxs 文件,其中 DisableModify 属性设置为使用变量值。但是我在 运行ning candle.exe 上看到编译错误。有人可以帮忙吗?

错误:

E:\DVD\Bundle.wxs(6):错误 CNDL0021:Bundle/@DisableModify 属性的值“[disablemodify]”不是合法选项之一:'button','yes',或 'no'。 E:\DVD\Bundle.wxs(7):错误 CNDL0004:WixVariable 元素包含意外属性 'Type'.

WXS 片段:

Bundle DisableModify="[disablemodify]" Manufacturer="ABC" Name="ABC Product" UpgradeCode="{xxx-xxx-xxx}" Version="12.0000.00.00"

变量名="disableModify" 类型="YesNoButtonType" 值="[disablemodify]"

Burn 不支持在安装时设置该值,仅在构建时支持。