Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


May 10, 2004

Catching Events in Windows Server 2003 and Windows XP

Learn how to use WMI event providers
RSS
View this exclusive article with VIP access -- click here to join |
See More Windows Management Instrumentation (WMI) Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

Catching Configuration Change Events
Microsoft implemented the configuration change provider as an event provider in Windows 2003 and XP. This provider and the Win32_SystemConfigurationChangeEvent event class indicate when the system's device list has been refreshed. Located in the root\cimv2 namespace, the Win32_SystemConfigurationChangeEvent event class is the only class supported by the configuration change provider and is documented at http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_systemconfigurationchangeevent.asp. The Win32_SystemConfigurationChangeEvent event class is a subclass of the Win32_DeviceChangeEvent superclass, which is also the parent class of the Win32_VolumeChangeEvent class (which I discuss next).

To subscribe to the Win32_SystemConfigurationChangeEvent event class, you must submit the WQL event query that Figure 3 shows. You'll then receive a notification when you add, remove, or reconfigure a system device. For instance, if you use GenericEventAsyncConsumer.wsf to submit the query, then connect a USB device to your Windows 2003 or XP system, you'll get results similar to those that Figure 3 shows. The EventType property indicates the type of device change that has occurred (Configuration Changed=1, Device Arrival=2, Device Removal=3, Docking=4). . . .


Already a VIP member?
Please log on to view the full article

Why become a VIP member?

VIP-only online access
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine

Subscribe Now
Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Windows 7 Sets Sales Record

Microsoft CEO Steve Ballmer described Windows 7's first ten days of sales as "fantastic" while in Japan yesterday. ...


Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events WinConnections and Microsoft® Exchange Connections

Don't Miss Windows Server 2008 Virtual Event

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement