Board logo

标题: VBS自动创建网络连接 [打印本页]

作者: youxi01    时间: 2008-1-6 09:56     标题: VBS自动创建网络连接

注:本文源自 dos联盟论坛 原作者已忘记,见谅.

vbs模拟按键创建网络连接
  1. Set WshShell = CreateObject("WScript.Shell")
  2. strCommandLine = "Rasphone -a"
  3. WshShell.Run(strCommandLine)
  4. WScript.Sleep 2000 '把这里要设置的时间长点
  5. WshShell.SendKeys "r"
  6. WScript.Sleep 30
  7. WshShell.SendKeys "{ENTER}"
  8. WScript.Sleep 30
  9. WshShell.SendKeys "pppoe"
  10. WScript.Sleep 30
  11. WshShell.SendKeys "{ENTER}"
  12. Set  WshShell = Nothing
复制代码





欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2