6 Responses to Using VBScript for Logon Scripts – Part 2

  1. Pingback: Using VBScript for Logon Scripts – Part 3 « My Windows System Administrator

  2. Dan says:

    What about a way to differentiate between Windows 7 and Server 2008 R2?
    Both have version number 6.1
    Is there a way to capture the OS name instead of the version number?

    • Brian says:

      Instead of objItem.Version you can try objItem.Caption. This will output the Operating System name to compare with. However, in my testing I had trouble comparing with strings.

  3. Dan says:

    That’s what I am testing with currently – with positive results. Instead of a
    VerBig = Left(objItem.Version,3)
    I am using Version = Mid(objOperatingSystem.Caption,19,14)

    This cuts off the MS Windows portion of the string. Server 2008 standard is not cooperating, but I am still working on that.

    • Brian says:

      Since I didn’t get consistent results with comparing strings, I would recommend using the version number as my article explained, but have a nested If statement using Caption that will separate Windows 7 from Windows Server 2008 R2. That way you will be able to look for Windows Server 2008 too.

  4. Dan says:

    That I don’t know how to do.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s