We have an automated testing cluster based on selenium-grid.
To manage the cluster, I have built a collection of Rake (Ruby) tasks which can start, restart, ping, and stop nodes. I'm testing our application across a number of browsers including IE6, IE7, and IE8. This means each node in the cluster has to be aware of which version of IE is installed so that it can claim the correct selenium-grid profile name (eg:
"IE6 on Windows XP"
"IE8 on Windows Vista"
wmic product where "Vendor like '%Microsoft%'" get Name, Version
You can use WMI, I know it's not a rake script, but you could run the script (or create a .NET application) and feed the results into your application.
It's kind of a hack, but at least it will work. Here's some code from technet.
strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ "\root\cimv2\Applications\MicrosoftIE") Set colIESettings = objWMIService.ExecQuery _ ("Select * from MicrosoftIE_Summary") For Each strIESetting in colIESettings Wscript.Echo strIESetting.Version Next
Once you have this information, you can pass the information to your rake script using the command line.
rake YourScript[<argument from vbscript>]
EDIT: You can copy/paste this code into a file, name it whatever.vbs, and use the cscript command to execute the script.
cscript //Nologo ie_version.vbs