找回密码
 加入
搜索
查看: 2334|回复: 3

[网络通信] 请教下,第二行错在哪了?(已解决)

  [复制链接]
发表于 2010-4-13 17:15:10 | 显示全部楼层 |阅读模式
本帖最后由 yuyun100 于 2010-4-14 08:25 编辑

#include <ACN_NET.au3>
_CMD_SetLocalIP("本地连接","192.168.0.22","255.255.255.0", "192.168.0.248", "172.16.16.0")

运行后只有DNS改了。
请教~
 楼主| 发表于 2010-4-13 17:45:29 | 显示全部楼层
顶下,让大大们看到
发表于 2010-4-13 18:29:49 | 显示全部楼层
本帖最后由 nmgwddj 于 2010-4-13 18:37 编辑

的确。
看了下ACN_NET.au3竟然是这样写的 另外LZ改标题吧 要么被锁帖了
Func _CMD_SetLocalIP($ConName, $IpADD, $SubMask, $GateWay, $ConDNS)
        If $SubMask = "" Then $SubMask = "255.255.255.0"
        If $ConName = "" And $IpADD <> "" Then
                RunWait(@ComSpec & ' /C netsh -c interface ip set address "本地连接" static ' & $IpADD & " " & $SubMask & " " & $GateWay, "", @SW_HIDE)
        EndIf
        If $ConName <> "" And $IpADD <> "" Then
                RunWait(@ComSpec & ' /C netsh -c interface ip set address ' & '"' & $ConName & '"' & ' static ' & $IpADD & " " & $SubMask & " " & $GateWay, "", @SW_HIDE)
        EndIf
        If $ConDNS <> "" Then
                RunWait(@ComSpec & ' /C netsh -c interface ip set dns ' & '"' & $ConName & '"' & ' static ' & $ConDNS & ' primary', "", @SW_HIDE)
        EndIf
EndFunc
发表于 2010-4-13 18:42:57 | 显示全部楼层
本帖最后由 nmgwddj 于 2010-4-13 18:58 编辑

测试了下上边的
RunWait的返回值是0

把问题描述清楚。
RunWait(@ComSpec & ' /c netsh interface ip set address "本地连接" static 192.168.1.6 255.255.255.0 192.168.1.1 202.99.224.8',"", @SW_HIDE)
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-10 20:33 , Processed in 0.184727 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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