Operating System Registry Monitor Registry Entry Level Events , WMI
' Monitor Registry Entry Level Events
Set wmiServices = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set wmiSink = WScript.CreateObject("WbemScripting.SWbemSink", "SINK_") wmiServices.ExecNotificationQueryAsync wmiSink, _ "SELECT * FROM RegistryValueChangeEvent WHERE " & _ "Hive='HKEY_LOCAL_MACHINE' AND " & _ "KeyPath='SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'" _ & " AND ValueName='CSDVersion'" WScript.Echo "Listening for Registry Change Events..." & vbCrLf While(1) WScript.Sleep 1000 Wend Sub SINK_OnObjectReady(wmiObject, wmiAsyncContext) WScript.Echo "Received Registry Change Event" & vbCrLf & _ wmiObject.GetObjectText_() End Sub
|
VbsEdit includes all these samples!
Download Now!
Version 5.4.1 - This package includes VbsEdit 32-bit, VbsEdit 64-bit, HtaEdit 32-bit and HtaEdit 64-bit. The evaluation version never expires.
Home
Buy Now
HtaEdit
Support
Video
What's new ?
|