Thanks! We'll email you
when relevant content is
added and updated.
This here is my current WMI code I'm using in a ConsoleApplication1.exe:
[code]Dim wmiServices = GetObject("winmgmts:root/default")
Dim colTreeChanges = wmiServices.ExecNotificationQuery _
("SELECT * FROM RegistryTreeChangeEvent " _
& "WHERE Hive='HKEY_LOCAL_MACHINE' " _
& "AND RootPath='SOFTWARE\Microsoft'")
Dim TreeChange = colTreeChanges.NextEvent
Console.Write("Hive = " & TreeChange.Hive & vbNewLine _
& "RootPath = " & TreeChange.RootPath _
This code helps detect all the changes inside the registry tree to monitor the installation of all programs. This is for a school project and I'm COMPLETELY NEW to Windows Management Instrumentation.
What I need to do now is the following:
1) Edit the code such that it only detects one instance of the output.
2) Also change the output such that it also shows the name of the program installed.
I already know how to redirect the output into the event viewer, but if anyone knows how to do the above, PLEASE help me. I only have about 4 weeks left till the end of this final year project.
Visual Studio 2008