nakedpeanut
Expert Member
I'm very new to this ( about 4 hours experience
)
This was my original problem: http://mybroadband.co.za/vb/showthread.php/248229-Script-to-export-windows-registry...
Now I've managed to get a vb script going which partially solves the problem
Now the output I get is as follows:
But I want to know exactly what is changed!
I kept looking and found an alternative to line 4. I've tried using "RegistryValueChangeEvent" as opposed to "RegistryKeyChangeEvent" but then it only looks at the USB key and the values which are changed in it.
I first want to find out which registry keys are created! (example when you insert a flash drive. Which new registry keys are made)
This was my original problem: http://mybroadband.co.za/vb/showthread.php/248229-Script-to-export-windows-registry...
Now I've managed to get a vb script going which partially solves the problem
Code:
[LIST=1]
[*]Set wmiServices = GetObject("winmgmts:root/default")
[*]Set wmiSink = WScript.CreateObject("WbemScripting.SWbemSink", "SINK_")
[*]
[*]
[*]wmiServices.ExecNotificationQueryAsync wmiSink, _
[*] "SELECT * FROM RegistryKeyChangeEvent WHERE Hive='HKEY_LOCAL_MACHINE' AND " & _
[*] "(KeyPath='SYSTEM\\CurrentControlSet\\Enum\\USB' OR KeyPath='SYSTEM\\CurrentControlSet\\Enum\\USBSTOR')"
[*]
[*]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 & _
[*] "------------------------------" & vbCrLf & _
[*] wmiObject.GetObjectText_()
[*]End Sub
[/LIST]
Now the output I get is as follows:
Code:
Received Registry Change Event
------------------------------
{
Hive = "HKEY_LOCAL_MACHINE";
KeyPath = "SYSTEM\\CurrentControlSet\\Enum\\USB"
TIME_CREATED ="129238405880625252";
};
But I want to know exactly what is changed!
I kept looking and found an alternative to line 4. I've tried using "RegistryValueChangeEvent" as opposed to "RegistryKeyChangeEvent" but then it only looks at the USB key and the values which are changed in it.
I first want to find out which registry keys are created! (example when you insert a flash drive. Which new registry keys are made)