determine the correct Windows and IE version
A free utility that finds malware and other threats
Status: Abandoned
Brought to you by:
merces
just found out that the win version displayed in log isn't necessarily correct.
Platform: Windows 7 SP1 (WinNT 6.00.3505) while it should be
Platform: Windows 7 SP1 6.1.7601
same for IE, it displays
MSIE: Internet Explorer v9.00 (9.00.8112.16476) while it should be
MSIE: Internet Explorer v9.00 (9.0.8112.16421)
the code seems correct though, don't know why it is retrieving the wrong info.
The code is correct, but incomplete as the api call should return all values.
For Windows 8 (basic version info)
Add this case below Case 1 (the windows 7 case):
Private Sub getWindowsInfo()
On Error Resume Next
Dim strComputername As String
Dim objWMIService As Object
Dim objQrySetting As Object
Dim objOS As Object
strComputername = "." ' Local computer
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\" & strComputername & "\root\cimv2")
Set objQrySetting = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem")
For Each objOS In objQrySetting
MsgBox "OS Name: " & objOS.Name & vbCrLf &
"Version: " & objOS.Version & vbCrLf &
"Service Pack: " & objOS.ServicePackMajorVersion & "." & objOS.ServicePackMinorVersion & vbCrLf &
"OS Manufacturer: " & objOS.Manufacturer & vbCrLf &
"Windows Directory: " & objOS.WindowsDirectory & vbCrLf & _
"Locale: " & objOS.Locale
Next
' Tidy up
Set objWMIService = Nothing
Set objQrySetting = Nothing
Set objOS = Nothing
End Sub
This uses WMI displays it correctly on Windows XP, Windows 8
Also possible to get the 32/64 bit identifier with this.
"type: " & objOS.OSArchitecture
Needs to be validated on different versions off course (my windows xp 32 vm does not report the OsArchitecture for example)
ok i have a win7/win8 that i can test on.
ok modified win7, win8, win vista and tested only on win7 for now and displays the right info.
Case 1 'Windows 7
sWinVer = "Windows 7 " &
sCSD & " " &
"(Windows 6." & .dwMinorVersion & "." & .dwBuildNumber & ")"
it should be working for others, but will test whenever i can put my hands on another OS.
now missing the IE part
ok, modified XP and tested.works.
added win2008 and win2012. to be tested.
ok for IE, there is a difference between, checking the version via the menu help|about, and checking the iexplorer.exe, version properties and this is what HJT is looking at. So for me this is correct.