How can I make the feature condition to work properly at the time of change mode in wix?

StackOverflow https://stackoverflow.com/questions/23466743

  •  15-07-2023
  •  | 
  •  

Вопрос

I am trying to modify the feature after installation.At the time of installation the feature condition is working properly. But at the time of change feature I am trying to disable the feature but it is not working. If I remove the condition element then everything is working fine. My question is the feature condition is working fine at install mode why it is failing on change mode.

The code that I am using is :

<Property Id="WORD14_32">
  <RegistrySearch Id="Word14_32"
                  Root="HKLM"
                  Key="SOFTWARE\Microsoft\Office\14.0\Word\InstallRoot"
                  Name="Path"
                  Type="raw"/>
</Property>

  <Feature
    Id = "WordAddinsFeature"
    Title  = "sampaddin"
    Level  = "1"
    Absent="allow">
    <Condition Level="0">((NOT WORD14_32) )</Condition>
    <ComponentRef Id = "WordAddInComp"/>
    <ComponentRef Id = "WordAddInRegComp"/>
  </Feature>
Это было полезно?

Решение

The problem with the above code is property values are not passed to server side at the time of modify the features. By setting the Secure attribute to 'yes' in property element it is working fine.By default Secure='no' in property element.

<Property Id="WORD14_32" Secure="yes">
  <RegistrySearch Id="Word14_32"
                  Root="HKLM"
                  Key="SOFTWARE\Microsoft\Office\14.0\Word\InstallRoot"
                  Name="Path"
                  Type="raw"/>
</Property>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top