monitor a process or application
By nater

strComputer = "."
Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/cimv2")
strWQL = "SELECT * " & _
"FROM __InstanceCreationEvent " & _
"WITHIN 2 " & _
"WHERE TargetInstance ISA 'Win32_Process' " & _
"AND TargetInstance.Name = 'notepad.exe'"
WScript.Echo "Waiting for a new instance of Notepad to start..."
Set objEventSource = objWMIService.ExecNotificationQuery(strWQL)
Set objEventObject = objEventSource.NextEvent()
WScript.Echo "A new instance of Notepad was just started."

Rating:


0/5 based on 0 votes. The median rating is 0.

Submitted: 11/19/10 (Edited 11/19/10)

Description: This script will monitor to see if an process of an application instance starts.

Tags:

Views: 43 views. Averaging 0 views per day.
In the most recent 30 day period, there've been 0 views.

Similar Articles:
Google Fiber Files For Franchise Application in Te
Google Fiber Files For Franchise Application in Te
Google Fiber Files For Franchise Application in Te
Comcast: You Should Monitor Your Usage Better - Ma
Comcast: You Should Monitor Your Usage Better - Ma

Previous Article | Next Article