General discussion

Locked

VBScript to invoke URL?

By GoPens ·
Hello,

I searched the forums for a possible solution but didn't find one. I am trying to figure out if there is a way to use a vbscript to open a URL link on a server. The purpose of this would be to register the server with another server starting a new session. Basically, I just want to call a URL from a vbscript that will run automatically when a server recovers from a failure. I am new to vbscripting so I hope I have explained this well enough!
Thanks in advance for any help.
Sean

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VbScript to invoke URL

by tjackson In reply to VBScript to invoke URL?

This is how I did it:

Call ViewHtml( "http://techrepublic.com.com", False )
' ******************************************************************************
' ******************************************************************************
Sub ViewHtml( ByVal sFile, ByVal bWait )
Dim oWsh
Const sgExeFile = "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
Const sWINDOWSTYLE = 3

If bWait = Empty Then
bWait = False
End If

Set oWsh = WScript.CreateObject("WScript.Shell")
oWsh.Run CHR(34) & sgExeFile & CHR(34) & " " & sFile, sWINDOWSTYLE, bWait

Set oWsh = Nothing
End Sub
' ******************************************************************************
' ******************************************************************************

Collapse -

by tmastana In reply to VBScript to invoke URL?

Dim wShell
Set wShell = CreateObject("WScript.Shell")
wShell.Run "this will be your url",9

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums