fcjoe Posted February 24, 2008 Share Posted February 24, 2008 Hello, Is there a way in AutoIt to determine if the OS of the machine the script is running on is a Workstation (Windows XP, Windows 2000 Pro) or server (Windows 2000 or Windows 2003 Server)? Thanks, Joe Link to comment Share on other sites More sharing options...
jokke Posted February 24, 2008 Share Posted February 24, 2008 I guess its possible to determine this by checking: @OSBuild UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
fcjoe Posted February 25, 2008 Author Share Posted February 25, 2008 I guess its possible to determine this by checking: @OSBuild Is the value returned for Windows 2000 Pro and Server different or the same? Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 25, 2008 Share Posted February 25, 2008 Try this: 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...
fcjoe Posted February 29, 2008 Author Share Posted February 29, 2008 That works, thanks Try this: 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 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