记录客户机操作的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
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
标签:
VBS,记录,客户机,操作
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
暂无“用VBS记录客户机操作的代码”评论...
更新动态
2024年05月13日
2024年05月13日
- 石琦梅《射雕 场景音乐原声带·中都》[FLAC/分轨][189.33MB]
- 璃月四星角色怎么选?角色选择心得推荐
- 闲云角色攻略心得,闲云角色配装推荐分享
- 闲云角色攻略心得,闲云角色圣遗物推荐
- 群星.2024-哈尔滨一九四四电视原声带【韶愔】【FLAC分轨】
- 陈良泉.1999-永恒的怀念2CD【温拿唱片】【WAV+CUE】
- 林鸿宇.2021-相爱的这种本能(EP)【华纳】【FLAC分轨】
- 超能敢死队:冰封之城 Ghostbusters: Frozen Empire
- 噬血芭蕾 Abigail
- 选举日 Founders Day
- 剑与远征启程豹女角色介绍 豹女值得培养吗
- 歧路旅人大陆的霸者开局选哪条路 三支主线
- 鸣潮桃祁声骸推荐 声骸主副词条选什么好
- 星穹铁道2.2糖浆药水的故事怎么达成 糖浆药水的故事隐藏成就攻略
- 星穹铁道2.2黄金与机械表怎么达成 黄金与机械表成就攻略