找回密码
 加入
搜索
查看: 1689|回复: 0

这个vbs能改成AU3的吗?谢谢

  [复制链接]
发表于 2008-10-19 00:49:31 | 显示全部楼层 |阅读模式
file2="c:\ok.htm"

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(file2,8,true)
file1.writeline now() & "---" & a & "---" & b & "<hr>"
file1.close

Loop
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-23 11:24 , Processed in 0.074041 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表