Wednesday, December 24, 2008

run access a link / web page

run access a link / web page

access_web.vbs

args = WScript.Arguments.Count

if args <> 1 then
Wscript.Echo "usage: GetHTMLSource.vbs URL"
wscript.Quit
end if

URL = WScript.Arguments.Item(0)

Set WshShell = WScript.CreateObject("WScript.Shell")

Set http = CreateObject("Microsoft.XmlHttp")
http.open "GET", URL, FALSE
http.send ""
WScript.Echo http.responseText

set WshShell = nothing
set http = nothing


access_web.bat

cscript access_web.vbs http://example.comg

No comments: