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

Microsoft® Windows® Scripting with WMI: Self-Paced Learning Guide

by Ed Wilson
October 2005
Beginner to intermediate
400 pages
12h 42m
English
Microsoft Press
Content preview from Microsoft® Windows® Scripting with WMI: Self-Paced Learning Guide
Chapter 11: Using Operating System Classes 251
On Your Own
Lab 22 Monitoring the Shutdown of Applications
In this lab, you will use the Win32_ProcessStopTrace operating system event class to monitor
the shutdown of applications. You will have two processes running on your computer, and
when one of the processes stops, you want to capture the name and process ID of the process.
When the second process stops, you will once again capture this information.
1. Open the WmiTemplate.vbs script and sa
ve it as StudentLab22.vbs.
2. Modify the
wmiQuery to select everything from the Win32_ProcessStopTrace class. The
line looks like the following:
wmiQuery = "SELECT * FROM Win32_ProcessStopTrace"
3. Modify the Set colItems line to perform an Exe ...
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® Scripting Self-Paced Learning Guide

Microsoft® Windows® Scripting Self-Paced Learning Guide

Ed Wilson

Publisher Resources

ISBN: 0735622310Catalog PageErrata