Sign in to follow this  
Followers 0
ReconX

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

4 posts in this topic

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks for the help guys. I was able to display it using this code:

Local $OSEdition = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "EditionID")

It was easier than I was making it. LOL. xD

Share this post


Link to post
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
Sign in to follow this  
Followers 0