VBS转AU3怎么转??
if Num<10 thenName="00"
else
if Num<100 then
Name="0"
else
Name=""
Set sh = Nothing
Set oShell = Nothing
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
strIPAddress = Array("192.168.0."&Num)
strSubnetMask = Array("255.255.255.0")
strGateway = Array("192.168.0.1")
For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway)
Dim dns
dns=Array("61.128.128.68","61.128.192.68")
err=objNetAdapter.SetDNSServerSearchOrder(dns) 汉化版本身已经集成,参考ACN_NET.au3 我来回复$colItems = ""
$strComputer = "localhost"
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration where IPEnabled=TRUE", "WQL", 0x10 + 0x20)
Local $strIPAddress = ["192.168.1.235"]
Local $strSubnetMask = ["255.255.254.0"]
Local $strGateway = ["192.168.1.1"]
Local $dns = ["202.96.128.80", "202.96.128.81"]
For $objItem In $colItems
$objItem.EnableStatic($strIPAddress, $strSubnetMask)
$objItem.SetGateways($strGateway)
$objItem.SetDNSServerSearchOrder($dns)
Next
MsgBox(0,"","完成") 谢谢,你们的回答,。:face (29): 呵呵,学习一下。。
页:
[1]