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

On Your Own: Lab 7 Working with Passing Arguments

In this lab, you’ll work with passing arguments by modifying a script that uses WMI to list all the services associated with a particular process on the machine. This is in fact a very useful script. While we are at it, we will simplify the script a little to make it easier to read.

Lab Instructions

  1. Open the servicesProcess.vbs script and save it as lab7.vbs.

  2. Add the Option Explicit command at the top of the script.

  3. Declare each variable used in the script. This would include the following:

    Dim objIdDictionary
    Dim strComputer
    Dim objWMIService
    Dim colServices
    Dim objService
    Dim colProcessIDs
    Dim i
  4. Save the script, and run it to ensure you have all the variables defined. If you missed a variable, Option ...

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