-
Notifications
You must be signed in to change notification settings - Fork 0
/
callurl.cmd
34 lines (24 loc) · 864 Bytes
/
callurl.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@if (@This==@IsBatch) @then
@echo off
rem **** batch zone *********************************************************
setlocal enableextensions disabledelayedexpansion
rem Batch file will delegate all the work to the script engine
if not "%~1"=="" (
wscript //E:JScript "%~dpnx0" %1
)
rem End of batch area. Ensure batch ends execution before reaching
rem javascript zone
rem Wait 3 seconds
timeout /t 3 /nobreak > NUL
exit
@end
// **** Javascript zone *****************************************************
// Instantiate the needed component to make url queries
var http = WScript.CreateObject('Msxml2.XMLHTTP.6.0');
// Retrieve the url parameter
var url = WScript.Arguments.Item(0)
// Make the request
http.open("GET", url, false);
http.send();
// All done. Exit
WScript.Quit(0);