Skip to Content
Microsoft® Windows® Scripting Self-Paced Learning Guide
book

Microsoft® Windows® Scripting Self-Paced Learning Guide

by Ed Wilson
April 2004
Beginner
416 pages
11h 3m
English
Microsoft Press
Content preview from Microsoft® Windows® Scripting Self-Paced Learning Guide

Lab 17 Echoing the Time Zone

In this lab, you modify the script from Lab 16 so that it echoes out the time zone configured on the computer.

Lab Instructions

  1. Open Notepad.exe.

  2. Open Lab16Solution.vbs, and save it as lab17.vbs.

  3. Edit the wmiQuery so that it points to Win32_TimeZone. The code will look like the following:

    wmiQuery = "Select * from Win32_TimeZone"
  4. Inside the For Each objItem In colItems loop, delete all but one of the WScript.Echo statements so that the code looks like the following:

    For Each objItem In colItems
        WScript.Echo "Caption: " & objItem.Caption
    Next
  5. Save and run the file. You are now pointing to the Caption field of Win32_TimeZone. No further changes are required for this lab.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Windows® 2000 Scripting Guide

Microsoft® Windows® 2000 Scripting Guide

Microsoft Corporation
Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner

Publisher Resources

ISBN: 9780735619814Supplemental ContentCatalog PageErrata