cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RakeshPatil
Level 5

How to verify URL

I have to validate a URL provided by user in input box during installation(any service URL), is there a way to achieve this?

I have to tell user whether the url entered is valid means exist or not.

Please help me with this.

Thanks in advance.
Labels (1)
0 Kudos
(2) Replies
operaza
Level 4

On Error Resume Next
URL = WScript.Arguments(0)
Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP.6.0")
oXMLHTTP.open "GET", URL, false
oXMLHTTP.send
Result="URLNotFound"
If oXMLHTTP.status = 200 Then
Result="URLFound"
else
Result="URLNotFound"
End If
0 Kudos
RakeshPatil
Level 5

operaza wrote:
On Error Resume Next
URL = WScript.Arguments(0)
Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP.6.0")
oXMLHTTP.open "GET", URL, false
oXMLHTTP.send
Result="URLNotFound"
If oXMLHTTP.status = 200 Then
Result="URLFound"
else
Result="URLNotFound"
End If



Thanks for your prompt reply.

can this code work in installscript script or any other way .

Means how can I use this code in installshield.
0 Kudos