用VBS记录客户机操作的代码
导读:收集整理的这篇文章主要介绍了用VBS记录客户机操作的代码,觉得挺不错的,现在分享给大家,也给大家做个参考。 记录客户机操作的vbS脚本on error resume next strCo...
收集整理的这篇文章主要介绍了用VBS记录客户机操作的代码,觉得挺不错的,现在分享给大家,也给大家做个参考。 记录客户机操作的vbS脚本on error resume next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set IPconfigSet = objWMIService.ExecQuery _
("Select IPAddress From Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For each IPConfig in IPConfigSet
If Not IsNull(IPConfig.IPAddress) Then
For i=LBound(IPConfig.IPAddress) to ubound(IPConfig.IPAddress)
a=IPConfig.IPAddress(i)
Next
End If
Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{ impersonationLevel=impersonate} !\\" & strComputer & "\root\cimv2")
Set colMonIToredPRocesses = objWMIService. _
ExecNotificationQuery("select * from __instancecreationevent " _
& " within 1 where TargetInstance isa 'Win32_Process'")
i = 0
Do While i = 0
Set objLatestProcess = colMonitoredProcesses.NextEvent
b=objLatestProcess.TargetInstance.COMmandLine
set fso=createobject("scripting.fileSystemobject")
set file1=fso.opentextfile("\\192.168.0.87\ourway$\ourway.htm",8,true)
file1.writeline now() & "---" & a & "---" & b & "hr> "
file1.close
Loop
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: 用VBS记录客户机操作的代码
本文地址: https://pptw.com/jishu/609622.html