April 2004
Beginner
416 pages
11h 3m
English
In this lab, you will practice monitoring print jobs by using the Win32_PrintJob WMI class.
Open Notepad.exe.
Set Option Explicit.
Save your script as Lab36Solution.vbs.
Declare the following variables: strComputer, wmiNS, wmiQuery, objWMIService, colItems, and objItem. Your Header information section will look like the following:
Option Explicit 'On Error Resume Next Dim strComputer Dim wmiNS Dim wmiQuery Dim objWMIService Dim colItems Dim objItem
Assign the value "." to the variable strComputer.
Assign the value "\root\cimv2" to the variable wmiNS.
Assign the value "Select * from Win32_PrintJob" to the wmiQuery variable. The code for steps 5, 6, and 7 is shown here:
strComputer = "." wmiNS = "\root\cimv2" ...