Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Create a Permanent Event FilterContent of Create a Permanent Event Filter.vbsMD5 Hash: 4E731B212E0AD24D80C631672247E165 |
||
' Description: Creates a permanent event filter for monitoring changes in service status.
strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default") strFilterQuery = "Select * from __InstanceModificationEvent within 3 " & _ "where TargetInstance isa 'Win32_Service'" Set objFilterClass = objWMIService.get("__EventFilter") Set objFilter = objFilterClass.SpawnInstance_ objFilter.Name = "Service Monitor Filter" objFilter.QueryLanguage = "wql" objFilter.Query = strFilterQuery objFilter.Put_ | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |