- Dim strComputer
- strComputer="."
- Set objWMIService=GetObject("winmgmts:\\" & strComputer &"\root\default")
- Set colEvents=objWMIService.ExecNotificationQuery("Select * from RegistryKeyChangeEvent Where Hive='HKEY_LOCAL_MACHINE' and " & "KeyPath='SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run'")
- Do
- Set objLatestEvent=colEvents.NextEvent
- MsgBox "在" & Now & "启动项被更改!",vbExclamation,"注册表防火墙"
- Loop
复制代码
http://hangzhou492.blog.51cto.com/67690/40609 |