am632 Posted July 12, 2011 Share Posted July 12, 2011 Hi, If I have the following.... MsgBox(0,"",@OSVersion) I get a return of 'WIN_7' but How can I get the message box to say either 'Home Premium' or 'Ultimate' etc. I need the full windows version for 7. thanks Link to comment Share on other sites More sharing options...
sleepydvdr Posted July 12, 2011 Share Posted July 12, 2011 You will need to read the following key in the registry: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
Zedna Posted July 12, 2011 Share Posted July 12, 2011 There are Windows API functions for this Syntax for PowerBuilder: Function Boolean GetVersionEx (Ref OSVERSIONINFOEX lpVersionInformation) Library "kernel32.dll" Alias For "GetVersionExA" Function Boolean GetProductInfo (ulong dwOSMajorVersion, ulong dwOSMinorVersion, ulong dwSpMajorVersion, ulong dwSpMinorVersion, Ref ulong pdwReturnedProductType) Library "kernel32.dll" Search this forum for example for these functions. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
taietel Posted July 12, 2011 Share Posted July 12, 2011 Or this? $colItems = "" $Output="" $objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem", "WQL", 0x30) If IsObj($colItems) then For $objItem In $colItems $Output = $objItem.Caption & " " & $objItem.Version & @CRLF if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop $Output="" Next Else Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_OperatingSystem" ) Endif Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
am632 Posted July 12, 2011 Author Share Posted July 12, 2011 thanks guys Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now