注:本文源自 dos联盟论坛 原作者已忘记,见谅.
vbs模拟按键创建网络连接
- Set WshShell = CreateObject("WScript.Shell")
- strCommandLine = "Rasphone -a"
- WshShell.Run(strCommandLine)
- WScript.Sleep 2000 '把这里要设置的时间长点
- WshShell.SendKeys "r"
- WScript.Sleep 30
- WshShell.SendKeys "{ENTER}"
- WScript.Sleep 30
- WshShell.SendKeys "pppoe"
- WScript.Sleep 30
- WshShell.SendKeys "{ENTER}"
- Set WshShell = Nothing
复制代码
|