脚本宝典收集整理的这篇文章主要介绍了用VBS记录客户机操作的代码,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
记录客户机操作的
vbS脚本
on&nbs
p;error resume next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" &
amp; strComputer & "\root\cimv2")
Set IP
configSet = objWMIService.ExecQuery _
("Select IPAddress
From Win32_NetworkAdapterConfiguration where I
PEnabled=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 colMon
ITo
redPRocesses = objWMIService. _
ExecNotificationQuery("select * f
rom __instancecreationevent " _
& " within 1 where T
argetInstance isa 'Win32_Process'")
i = 0
Do While i = 0
Set objLa
testProcess = colMonitoredProcesses.NextEvent
b=objLatestProcess.TargetInstance
.COMmandLine
set fso=createobject("scripting.file
Systemobject")
set file1=fso.opentextfile("\\192.168.0.87\ourway$\ourway.htm",8,true)
file1.writeline now() & "---" & a & "---" & b & "<
hr>"
file1.close
Loop
脚本宝典总结
以上是脚本宝典为你收集整理的用VBS记录客户机操作的代码全部内容,希望文章能够帮你解决用VBS记录客户机操作的代码所遇到的问题。
如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。