手机
当前位置:查字典教程网 >脚本专栏 >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记录客户机操作的代码】相关文章:

妙用VBScript自制IE工具栏按钮的代码

用vbs确定计算机是否有 USB 2.0 端口的代码

用vbs实现枚举网络连接的代码

用vbs控制iis创建虚拟目录的代码

使用SAFEARRAY返回的代码

VBS中常用脚本代码

用VBS可执行程序+Xmlhttp下载备份网上文件的代码

用vbs实现不死帐号的代码

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

用vbs确定用户的登录名的代码

精品推荐
分类导航