PearsonAus Posted September 7, 2009 Share Posted September 7, 2009 (edited) Hi AllWe need a line to make the script quit if it is detected on a 'server 2003' version of windows.Can someone help me with this?Thanks HeapsPearsonAus Edited September 7, 2009 by PearsonAus Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 7, 2009 Share Posted September 7, 2009 Define "server". Are you referring to Windows NT Server, Windows Server 2003, and Windows Server 2008? Link to comment Share on other sites More sharing options...
PearsonAus Posted September 7, 2009 Author Share Posted September 7, 2009 It is Windows Server 2003 version. And thanks for pointing this out.Define "server". Are you referring to Windows NT Server, Windows Server 2003, and Windows Server 2008? Link to comment Share on other sites More sharing options...
andygo Posted September 7, 2009 Share Posted September 7, 2009 maybe this helps: @OSVersion try what it say running on your 2003 server: msgbox (64, "", @OSVersion) then you could use it like if @OSVersion = "WIN_2003" then ... or maybe a combination of macros helps you Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 7, 2009 Share Posted September 7, 2009 (edited) Then add a line at the top of the script. If @OSVersion = "WIN_2003" Then Exit Edited September 7, 2009 by Richard Robertson Link to comment Share on other sites More sharing options...
PearsonAus Posted September 8, 2009 Author Share Posted September 8, 2009 Hi Richard Thanks alot for the quick help. I was just wondering as I am not a developer so it is possible if you can help me how to create the whole code from the scratch.I'll add this into our existing script file anyway for testing. Regards PearsonAus Then add a line at the top of the script. If @OSVersion = "WIN_2003" Then Exit Link to comment Share on other sites More sharing options...
Khab Posted September 8, 2009 Share Posted September 8, 2009 (edited) Hi RichardThanks alot for the quick help. I was just wondering as I am not a developer so it is possible if you can help me how to create the whole code from the scratch.I'll add this into our existing script file anyway for testing.RegardsPearsonAusThe whole code for what? That is the whole code to terminate the script if the version of windows returns as WIN_2003.I don't think @OSVersion differentiates between, say, WIN NT4 Workstation & Server, though (unless you also use @OSBuild but even then I suspect the same SP level is the same build).You could use @LogonDomain and check if it equals @ComputerName but that assumes that any server a) is configured to use a domain, computer name doesn't = domain name. I would expect these to be true in pretty much every case, but its a workaround way to do it. Edited September 8, 2009 by Khab Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 8, 2009 Share Posted September 8, 2009 AutoIt has dropped support for Windows 2000/NT. It's not worth worrying about it. Link to comment Share on other sites More sharing options...
PearsonAus Posted September 18, 2009 Author Share Posted September 18, 2009 RichardThanks for the detailed information and help.However, when I run the code which you gave me earlier last week - it detects "Windows Server 2003" as "Windows XP version" even if I ran this on XP or Server. So tried playing arround and found something new for me here:If @OSBuild = "3790" Then ExitEndIfThe above script works fine. Anyway I am not sure why it was not detecting OSVersion type where it is detecting OSBuild. Any idea?RegardsPearsonAus Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 18, 2009 Share Posted September 18, 2009 Well, Windows Server 2003 is built on XP. Perhaps it's a bug in the version of AutoIt you are using. Are you using the latest beta? Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 18, 2009 Share Posted September 18, 2009 AutoIt has dropped support for Windows 2000/NT. It's not worth worrying about it.Uhmm... I think all the Win32 APIs of WinNT and Win2K are still supported. What was dropped a while ago was support for Win16 APIs (Win 3.1, Win9x). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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