2011-12-16 79 views
3

我正在使用wix RadioButton接受值,“是”或“否”。基于用户选择,我正在设置一个属性。基于该属性,我设置了一个注册表键。在更改/修改期间wix修改注册表值

<Control Id="Enable" Type="RadioButtonGroup" X="20" Y="100" Width="330" Height="40" Property="ENABLEKEY1" Hidden="yes"> 
    <RadioButtonGroup Property="ENABLEKEY1"> 
     <RadioButton Value="1" X="10" Y="0" Width="250" Height="20" Text="!(loc.WixUIYes)" /> 
     <RadioButton Value="0" X="10" Y="20" Width="250" Height="20" Text="!(loc.WixUINo)" /> 
    </RadioButtonGroup> 
    <Condition Action="show">ALLOWENABLEKEY1=1</Condition> 
    <Condition Action="enable">ALLOWENABLEKEY1=1</Condition> 
    </Control> 

下面是设置密码注册表:

<Component Id="C1" Guid="{A2186658-6214-4D31-21A6-F9AA48889A4A}"> 
    <RegistryKey Id="R1" Root="HKLM" Key="SOFTWARE\MYPRODUCT" Action="createAndRemoveOnUninstall"> 
     <RegistryValue Type="integer" Name="EnableKey1" Value="[ALLOWENABLEKEY1]" Action="write"/> 
    </RegistryKey> 
    </Component> 

当我选择单选按钮“否”选项,注册表被正确填充为0。但是,在维护模式(更改/修改)如果我选择“是”选项,注册表仍然有0值。它没有得到更新到1.

任何人都可以请告诉我做错了什么?

非常感谢

马克

回答

0

修改来设置重新安装并REINSTALLMODE属性UI,如在this answer

描述