sburday Posted April 9, 2011 Report Share Posted April 9, 2011 Is there a way to use the macros to determine the version of IE that a user is running? I've got a situation where we will be moving from IE6 to IE8 in a phased deployment and the macros will need to work differently depending on the IE version the user has installed. Quote Link to comment Share on other sites More sharing options...
kevin Posted April 9, 2011 Report Share Posted April 9, 2011 Use the macro command Read Registry Value "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version" into %IE_Version% to read the version from the registry. Microsoft documentation here: Information about Internet Explorer versions. This sample macro displays the version number of Internet Explorer: Read Registry Value "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version" into %IE_VersionStr% Split String "%IE_VersionStr%" on "." into %IE_Version%, starting at 1 Text Box Display: IE Version To run this sample macro copy the following and paste it into a macro: <READ REGISTRY VALUE Key="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Internet Explorer\\Version" Destination="%IE_VersionStr%"/> <SPLIT STRING Source="%IE_VersionStr%" SplitChar="." Dest="%IE_Version%" Index="1"/> <TEXT BOX DISPLAY Title="IE Version" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Full version string: \\f1 %IE_Version\\f0 Str\\f1 %\r\n\\par \r\n\\par \\f0 Major: %IE_Version[1]%\r\n\\par Minor: %IE_Version[2]%\r\n\\par Build: %IE_Version[3]%\r\n\\par Sub-build: %IE_Version[4]%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="313" Height="181" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.