Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Monitor  Registry  Subtree  Events  

 Content of Monitor Registry Subtree Events.vbs
MD5 Hash: A7FAAFF8A03847B2D5BA47A6407ED55E
' Description: Temporary event consumer that monitors the registry for any changes to the HKLM portion of the registry.


Set wmiServices = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default")

Set wmiSink = WScript.CreateObject("WbemScripting.SWbemSink", "SINK_")

wmiServices.ExecNotificationQueryAsync wmiSink, _
"SELECT * FROM RegistryTreeChangeEvent WHERE Hive= " _
& "'HKEY_LOCAL_MACHINE' AND RootPath=''"


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 ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a