Jump to content

Detecting Windows Edition (Student, Home, Pro, Enterprise, Ultimate)


Go to solution Solved by ReconX,

Recommended Posts

I am trying to detect which edition is on the computer and display it in a label. I have the Windows Version and Architecture already.

$hOsVersion = GUICtrlCreateLabel("Version: " & $OSVersion & " - " & $OSArch, 5, 5, 300, 20, $SS_CENTER)

What I would like to display is.....

$hOsVersion = GUICtrlCreateLabel("Version: " & $OSVersion & " " & $OSEdition & " - " & $OSArch, 5, 5, 300, 20, $SS_CENTER)

Thanks for any help.

Link to comment
Share on other sites

Credits: Xenobiologist

( a little modified )

MsgBox(0,0, _getOSVersion())

Func _getOSVersion()
    Local $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
    Local $colSettings = $objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
    For $objOperatingSystem In $colSettings
        Return $objOperatingSystem.Caption
    Next
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...