Emiel Wieldraaijer Posted August 16, 2007 Share Posted August 16, 2007 Hi All, is there a way to retrieve the windows version like displayed in ControlPanel/System for example Windows 2000 Professional/Server/Advanced Server Windows XP Home/Professional/Media Center Edition Windows Vista Home Basic/Home Premium/Business/Ultimate Windows 2003 Web/Standard/Enterprise/Datacenter Thnx Emiel Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Zedna Posted August 16, 2007 Share Posted August 16, 2007 (edited) Look at CompInfo UDF and it's Func _ComputerGetOSs(ByRef $aOSInfo) Edited August 16, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted August 16, 2007 Author Share Posted August 16, 2007 Hi Zedna, thnx but it does not retrieve the information i want .. or i have the wrong version of it .. there are also some errors in the script .. not all information is retrieved correctly .. Emiel Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
spudw2k Posted August 16, 2007 Share Posted August 16, 2007 You can get that info from WMI. CODEdim $strData $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & "localhost" & "\root\cimv2") $colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_OperatingSystem") For $objItem in $colItems $strData = $strData & "Caption - " & $objitem.Caption & @crlf $strData = $strData & "BuildNumber - " & $objitem.BuildNumber & @crlf $strData = $strData & "CSDVersion - " & $objitem.CSDVersion & @crlf $strData = $strData & "Version - " & $objitem.Version & @crlf Next msgbox(0,"Results",$strData) I believe they translate the build and ver number into version 200X on the System Info applet. Hope that helps. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted August 17, 2007 Author Share Posted August 17, 2007 (edited) @spudw2k and @zednaThnx for the example .. but when i look at http://msdn2.microsoft.com/en-us/library/aa394239.aspxi'll have to use the OperatingSystemSKUbut i get the following error message "The requested action with this object has failed."These option is left out of the compinfo udf maybe for the same reason .. [edit]aha i see "Windows Server 2003, Windows XP, Windows 2000, and Windows NT 4.0 not supported" so will work only in vista..[/edit]Emiel Edited August 17, 2007 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted August 19, 2007 Author Share Posted August 19, 2007 this can be retrieved by DLLCall kernel32.dll GetOSVersio (Ex)http://msdn2.microsoft.com/en-us/library/ms724451.aspxbut i looked at it .. but i can't figure out how it works .. Emiel Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Zedna Posted August 19, 2007 Share Posted August 19, 2007 this can be retrieved by DLLCall kernel32.dll GetOSVersio (Ex)http://msdn2.microsoft.com/en-us/library/ms724451.aspxbut i looked at it .. but i can't figure out how it works .. EmielAlways use Search function.Here is the link Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted August 20, 2007 Author Share Posted August 20, 2007 Always use Search function.Here is the linkHi Zedna,strange .. before i asked the question i searched for OSVersion.. but didn't find the answer.. But thanks.. this will solve my question Emiel Best regards,Emiel Wieldraaijer 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