GoogleDude Posted March 13, 2008 Share Posted March 13, 2008 How in AutoIt can I determin if a script is running on Windows XP Pro vs Home Edition? I know how to determin what version of Windows just not weather its Pro or Home? I have a script that does not apear to run under Home Edition but does under Pro, So I want to put a check in the begining of my script. Thanks, GoogleDude Link to comment Share on other sites More sharing options...
rudi Posted March 13, 2008 Share Posted March 13, 2008 Hi.How in AutoIt can I determin if a script is running on Windows XP Pro vs Home Edition?You can see the difference in the output of "start, run, winver", use filemon and regmon to check what it's reading. This might point you to the difference in a file or a registry key.Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 13, 2008 Share Posted March 13, 2008 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 StringMid($objOperatingSystem.Caption, 19) Next EndFunc ;==>_getOSVersion Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
rudi Posted March 13, 2008 Share Posted March 13, 2008 Hi. Do you have a URL to some site listing all these nice WMI readable stuff? Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 13, 2008 Share Posted March 13, 2008 (edited) Search for Scriptomatic or on MSDN Edited March 13, 2008 by Xenobiologist Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
spudw2k Posted March 13, 2008 Share Posted March 13, 2008 http://msdn2.microsoft.com/en-us/library/a...084(VS.85).aspx 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...
GoogleDude Posted March 14, 2008 Author Share Posted March 14, 2008 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 StringMid($objOperatingSystem.Caption, 19) Next EndFunc ;==>_getOSVersion Mega Thanks that did the trick! Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 14, 2008 Share Posted March 14, 2008 Thanks that did the trick!Fine! Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
GEOSoft Posted March 14, 2008 Share Posted March 14, 2008 Hi.Do you have a URL to some site listing all these nice WMI readable stuff?Regards, Rudi.Use The AutoIt Scriptomatic in my signature. If you use the MS Scriptomatic you have to convert the VBS to AutoIt. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Dougiefresh Posted April 6, 2009 Share Posted April 6, 2009 (edited) The problem I faced and my solution:#666077 Edited April 6, 2009 by Dougiefresh 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