The following code uses WMI to determine the version number of the Windows OS installed on a given computer on the network.
'
' Get Operating System Version
'
'
function getOSVersion(strComputer)
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM Win32_OperatingSystem",,48)
For Each objItem in colItems
theValue = objItem.Version
Next
getOSVersion = theValue
end function
