|
2#
楼主 |
发表于 2012-8-11 21:49:05
|
只看该作者
在winos网站里找到一段脚本代码,由于我现在系统是win7 64位的,运行时提示“缺少语句”,不知道是代码问题还是我系统问题,有没有人愿意帮我测试一下,注意:运行时360会提示有木马,我让它信任了,你要是不信就不用测试。
测试方法:
1。将下列代码保存到记事本中,文件名任意取,后缀为VBS,比如a.vbs
2。点开始-运行-cmd,然后在DOS窗口中运行"cscript a.vbs"(引号不用)
3.看看结果都有啥提示。
以下****号下面的为代码
****************************************开始处,此处不用复制*****************************
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colMonitorPrinfJob = objWMIService.ExecNotificationQuery _
("SELECT * FROM __InstanceCreationEvent WITHIN 1" & _
"WHERE TargetInstance ISA 'Win32_PrintJob'")
Do
WScript.Echo "Waiting for PrintJob to be created ..."
Set objLatestEvent = colMonitorPrinfJob.NextEvent
Wscript.Echo VbCrLf & "Document Name: " & objLatestEvent.TargetInstance.Document
Wscript.Echo "User Name: " & objLatestEvent.TargetInstance.Owner
Wscript.Echo "TimeSubmitted: " & WMIDateStringToDate(objLatestEvent.TargetInstance.TimeSubmitted)
Wscript.Echo "TotalPages: " & objLatestEvent.TargetInstance.TotalPages
Loop
Function WMIDateStringToDate(dtmInstallDate)
WMIDateStringToDate = CDate(Mid(dtmInstallDate, 5, 2) & "/" & _
Mid(dtmInstallDate, 7, 2) & "/" & Left(dtmInstallDate, 4) _
& " " & Mid (dtmInstallDate, 9, 2) & ":" & _
Mid(dtmInstallDate, 11, 2) & ":" & Mid(dtmInstallDate, _
13, 2))
End Function
****************************************结束处,此处不用复制***************************** |
|