How can I configure the .wxs file to detect the latest version of IE when writing to the FEATURE_BROWSER_EMULATION RegistryKey file?

I have a .wxs file with a component

<Component Id="IE_BROWSER_EMULATION_REGISTRY" Guid="*">
     <RegistryKey Root="HKCU" Key="SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION">
          <RegistryValue Type="integer" Name="SDLTradosStudio.exe" Value="9999" KeyPath="yes"/>
     </RegistryKey>
</Component>

      

I know that end users will be using Windows 7 and will most likely have at least IE 9 installed on the computer. But I really would like to set the value to the latest version of IE installed on the user's computer. I am using WiX editing tool to create .msi. How to determine the latest version of IE installed on a user's computer?

+3


source to share


1 answer


The IE version is stored in the registry at HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Internet Explorer \ svcVersion

Use the following code to get the registry key value for a property

<Property Id="IEVERSION">
    <RegistrySearch Id="IEVer"
                    Root="HKLM"
                    Key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer"
             Name="svcVersion"
                    Type="raw" />
</Property>

      



Once you have the IE version in the property, you can use a condition to test it.

Example:

<![CDATA[IEVersion >= 9]]>

      

+3


source







All Articles