国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > VBScript > 正文

用VBS記錄客戶機操作的代碼

2020-06-26 18:12:17
字體:
來源:轉載
供稿:網友
記錄客戶機操作的VBS腳本
 
記錄客戶機操作的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  
 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 西平县| 车险| 修武县| 石城县| 荣昌县| 阳泉市| 榆林市| 新巴尔虎右旗| 张家港市| 蒲江县| 吕梁市| 新疆| 塔河县| 乌审旗| 咸阳市| 凤冈县| 突泉县| 安新县| 额敏县| 嵩明县| 上犹县| 岳池县| 右玉县| 那坡县| 阿坝县| 城市| 芜湖县| 莒南县| 云浮市| 凌海市| 台安县| 安康市| 普安县| 永丰县| 乌鲁木齐县| 垣曲县| 旌德县| 惠州市| 阳新县| 含山县| 响水县|