Jump to content

AutoIt Script quit if it is detected on a 'Server' Version of Windows


Recommended Posts

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

The 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, :D 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 by Khab
Link to comment
Share on other sites

  • 2 weeks later...

Richard

Thanks 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 Exit

EndIf

The above script works fine.

Anyway I am not sure why it was not detecting OSVersion type where it is detecting OSBuild. Any idea?

Regards

PearsonAus

Link to comment
Share on other sites

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).

:D

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...