wix IIS version in uninstall condition fails
I have a custom control as shown below.
During uninstall the condition that checks for IIS_MAJOR_VERSION="#7" AND IIS_MINOR_VERSION="#5" seems to fail although during install this condition is true.
I did check in the uninstall file that the property for IIS_MAJOR_VERSION="#7" AND IIS_MINOR_VERSION="#5". Does anyone know what did I do wrong?
<Property Id="IIS_MAJOR_VERSION">
<Re开发者_运维技巧gistrySearch Id="CheckIISVersion"
Root="HKLM"
Key="SOFTWARE\Microsoft\InetStp"
Name="MajorVersion"
Type="raw" />
</Property>
<Property Id="IIS_MINOR_VERSION">
<RegistrySearch Id="CheckIISMinorVersion"
Root="HKLM"
Key="SOFTWARE\Microsoft\InetStp"
Name="MinorVersion"
Type="raw" />
<Custom Action="DropDBUSerIIS75" Before="InstallFinalize">Installed AND NOT UPGRADINGPRODUCTCODE AND IIS_MAJOR_VERSION="#7" AND IIS_MINOR_VERSION="#5"</Custom>
Even I am not sure about the code why is it going wrong, but for precaution use this code to get the value of IIS version because even if IIS is un-installed the above registry key values will persist.
<Property Id="IIS_MAJOR_VERSION">
<RegistrySearch Id="CheckIISVersion"
Root="HKLM"
Key="SYSTEM\CurrentControlSet\services\W3SVC\Parameters"
Name="MajorVersion"
Type="raw" />
</Property>
<Property Id="IIS_MINOR_VERSION">
<RegistrySearch Id="CheckIISMinorVersion"
Root="HKLM"
Key="SYSTEM\CurrentControlSet\services\W3SVC\Parameters"
Name="MinorVersion"
Type="raw" />
精彩评论