Board logo

标题: [转贴] VBS脚本监视注册表启动项的增加和删除 [打印本页]

作者: VBScript    时间: 2012-4-26 20:29     标题: VBS脚本监视注册表启动项的增加和删除

  1. Dim strComputer
  2. strComputer="."
  3. Set objWMIService=GetObject("winmgmts:\\" & strComputer &"\root\default")
  4. Set colEvents=objWMIService.ExecNotificationQuery("Select * from RegistryKeyChangeEvent Where Hive='HKEY_LOCAL_MACHINE' and " & "KeyPath='SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run'")
  5. Do
  6.     Set objLatestEvent=colEvents.NextEvent
  7.     MsgBox "在" & Now & "启动项被更改!",vbExclamation,"注册表防火墙"
  8. Loop
复制代码


http://hangzhou492.blog.51cto.com/67690/40609




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2