VBScript 监控磁盘更改事件实现代码
更新时间:2013年07月28日 19:18:59 作者:
这篇文章主要介绍了如何用vbs实现监控磁盘更改事件,需要的朋友可以参考下
来自微软官方,写USB小偷脚本是最好不过的了
复制代码 代码如下:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colMonitoredEvents = objWMIService. _
ExecNotificationQuery("Select * from Win32_VolumeChangeEvent")
Do
Set objLatestEvent = colMonitoredEvents.NextEvent
Wscript.Echo objLatestEvent.DriveName
Wscript.Echo objLatestEvent.EventType
Wscript.Echo objLatestEvent.Time_Created
Loop
相关文章
VBS 强制关闭Symantec Endpoint Protection的代码
很多企业电脑系统是Windows Xp,使用Windows server 2003 来控制,其中客户端得杀毒软件有不少是使用 Symantec Endpoint Protection2013-01-01
利用WScript.Shell对象隐藏cmd命令行运行框的实现代码
利用WScript.Shell对象隐藏cmd命令行运行2009-12-12


最新评论