Then you should consider pass him/her below script. Script below automates process above so with a double click he/she could open the Web Based HTTP management GUI with default Internet browser.
Option Explicit
Dim oShell
Dim oShellExec
Dim oStdOutputText, sText, strTarget, strPingResults
Set oShell = CreateObject("Wscript.Shell")
Set oShellExec = oShell.Exec("%comspec% /c route print")
set oStdOutputText = oShellExec.StdOut
Do While Not oStdOutputText.AtEndOfStream
sText = oStdOutputText.ReadLine
If InStr(sText, "Default Gateway") <> 0 Then
strTarget = split(sText,":")
exit do
End If
Loop
Set oShellExec = oShell.Exec("%comspec% /c ping -n 1 " & strTarget(1))
strPingResults = LCase(oShellExec.StdOut.ReadAll)
If InStr(strPingResults, "reply from") Then
Set oShellExec = oShell.Exec("%comspec% /c start http://" & trim(strTarget(1)))
Else
WScript.Echo "******** Local router is DOWN ********"
End If
Set oShellExec = Nothing
Copy and paste above codes into notepad and name it as open_modem_gui.vbs. Note that the extension must be *.vbs.
IF he/she asked you "Hey it prompts for password now. How?" just ask him/her to refer to the ADSL modem user manual.
No comments:
Post a Comment