#7 determine the correct Windows and IE version

Release 2.0.6
accepted
None
5
2013-05-22
2013-05-14
No

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)

Discussion

  • Loucif Kharouni

    Loucif Kharouni - 2013-05-14

    the code seems correct though, don't know why it is retrieving the wrong info.

     
  • Loucif Kharouni

    Loucif Kharouni - 2013-05-15
    • Group: Next_Beta_Release_2.0.5 --> Release 2.0.6
     
  • Mark van Tilburg

    The code is correct, but incomplete as the api call should return all values.

     
  • Mark van Tilburg

    For Windows 8 (basic version info)
    Add this case below Case 1 (the windows 7 case):

                        Case 2 'Windows 8
                            sWinVer = "Windows 8 " & sCSD & " " & "(Windows 6." & .dwMinorVersion & ")"
                            'TOFIX, this value is not the correct windows 8 build number as shown with "ver" command
    
     
  • Mark van Tilburg

    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

     
  • Mark van Tilburg

    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)

     
  • Loucif Kharouni

    Loucif Kharouni - 2013-05-15

    ok i have a win7/win8 that i can test on.

     
  • Loucif Kharouni

    Loucif Kharouni - 2013-05-15

    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

     
  • Loucif Kharouni

    Loucif Kharouni - 2013-05-15

    ok, modified XP and tested.works.

     
  • Loucif Kharouni

    Loucif Kharouni - 2013-05-15

    added win2008 and win2012. to be tested.

     
  • Loucif Kharouni

    Loucif Kharouni - 2013-05-15

    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.

     
  • Loucif Kharouni

    Loucif Kharouni - 2013-05-15
    • status: open --> pending
     
  • Loucif Kharouni

    Loucif Kharouni - 2013-05-22
    • status: pending --> accepted
    • assigned_to: Loucif Kharouni
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks