Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Monitor Registry Entry Level EventsContent of Monitor Registry Entry Level Events.vbsMD5 Hash: D4EC006E545DB0D222D023181FA1E619 |
||
' Description: Temporary event consumer that monitors the registry for any changes to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CSDVersion.
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 | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |