windows-installerbootstrapperwix3.8

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


I am working on a product bootstrapper. where I need to dynamically change the value of DisableModify attribute during run time. I don't see any proper documentation or answer online. I have tried declaring variable and using it, but of no luck. I have pasted the wxs file where DisableModify attribute is set to use a variable value. But I see compilation error when running candle.exe on it. Could someone help?

Error:

E:\DVD\Bundle.wxs(6) : error CNDL0021 : The Bundle/@DisableModify attribute's value, '[disablemodify]', is not one of the legal options: 'button', 'yes', or 'no'. E:\DVD\Bundle.wxs(7) : error CNDL0004 : The WixVariable element contains an unexpected attribute 'Type'.

WXS snippet:

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

Variable Name="disableModify" Type="YesNoButtonType" Value="[disablemodify]"


Solution

  • Burn doesn't support setting that value at install time, only at build time.