How to set a check box to “unchecked” from the msiexec command line?

前端 未结 2 1872
走了就别回头了
走了就别回头了 2020-12-19 06:29

I have an msi (authored with WIX) that has a check box bound to a custom property (call it MY_PROPERTY). I would like to run this msi from the command line, specifying 0 (u

2条回答
  •  别那么骄傲
    2020-12-19 07:07

    This is how it is "supposed" to work - basically, the property doesn't exist until a user checks the checkbox, then it is "set" (exists). So if you want to do a custom action when a checkbox is checked, you test for the existence of the property as a condition for running the custom action, instead of checking for the value that the custom prop is set to.

    I think the best way to handle this from the command line is what you have already mentioned: if you want the checkbox to be selected, specifiy the custom prop on the command line, otherwise, don't and the checkbox will not be selected.

提交回复
热议问题