Jump to content
Sign in to follow this  
ScriptingSteve

How does the @OSVERSION function determine the OS?

Recommended Posts

I have a script running at logon for approx. 12000 users. I use @OSVERSION to limit execution to Windows XP computers. The script is aborting on one computer, claiming it is "WIN_NT4" when it is most obviously XP.

Something that AutoIt reads to fulfill the @OSVERSION function is obviously corrupted, and if I knew what these were, I could analyze the corruption further.

So,

What registry values, etc, are referenced by the @OSVERSION macro?

Share this post


Link to post
Share on other sites

Autoit inturpits the values of OSVERSIONINFO (http://msdn2.microsoft.com/en-us/library/ms724834.aspx) if nothing has changed since the source was last relased -

OS_Version::OS_Version()
{
    int             i;
    OSVERSIONINFO   OSvi;                       // OS Version data

    // Get details of the OS we are running on
    OSvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
    GetVersionEx(&OSvi);

...

It uses the Win32 API so if your computer thinks it the wrong OS its got identity problem. Try talking to it and explaining that winxp isn't really that bad :shocked:

Edited by evilertoaster

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...