Windows PPPoE Redial Script (VBScript)

Windows PPPoE Redial Script (VBScript)
DIALNAME = "xxx"
DIALUSER = "xxx"
DIALPASS = "xxx"

Set WshShell = CreateObject("WScript.Shell")
RetCode = WshShell.Run("ping www.baidu.com", 0, true)
If RetCode <> 0 Then
    WshShell.Run "rasdial " & DIALNAME & " /DISCONNECT", 0, true
    WScript.Sleep(3000)
    WshShell.Run "rasdial " & DIALNAME & " " & DIALUSER & " " & DIALPASS, 0
    WScript.Sleep(3000)
End If

你可能感兴趣的:(Windows PPPoE Redial Script (VBScript))