用批处理运行不会拔号,手动就可以拔
$s1=IniRead("config.ini","RUN","P","")$s2=IniRead("config.ini","RUN","D","")
$s3=IniRead("config.ini","RUN","DU","")
$s4=IniRead("config.ini","RUN","DP","")
$s5=IniRead("config.ini","RUN","CT","")
Sleep(5000)
RunWait(@ComSpec & ' /c rasdial '& $s2 & ' /disconnect',"",@SW_HIDE)
Sleep($s5)
RunWait(@ComSpec & ' /c rasdial '& $s2 & ' ' & $s3 & ' ' & $s4,"",@SW_HIDE)
Sleep(1000)
Run("DNFchina1.exe") 拔号后运行dnfchina1.exe
编译后手动打开可以拔号运行dnfchina1.exe ,但是用批处理打开的话就不会拔号了.请指教. 那个是什么程序,是DNF?你自动拨号成功了吗? 这个是什么程序?命令行语法是否正确?
是否漏了双引号和空格? 检查【宽带连接】名称里是否包含空格,记得加上双引号! Run("DNFchina1.exe")这是相对路径吧。 用批处理调用的时候要填绝对路径。
比如Run("C:\DNFchina1.exe") RunWait(@ComSpec & ' /c rasdial '"&$s2&''' /disconnect',"",@SW_HIDE)
在DOS下连接变量语法错误
页:
[1]