|
|
@@ -55,13 +55,16 @@ cd %~dp0
|
|
|
>> temp.cs ECHO done = true;
|
|
|
>> temp.cs ECHO }
|
|
|
>> temp.cs ECHO }
|
|
|
-> temp1.vbs ECHO Dim strFileURL, strHDLocation
|
|
|
+> temp1.vbs ECHO WScript.Echo "Downloading using a fallback method. This might take a few minutes."
|
|
|
+>> temp1.vbs ECHO Dim strFileURL, strHDLocation
|
|
|
>> temp1.vbs ECHO strFileURL = WScript.Arguments(0)
|
|
|
>> temp1.vbs ECHO strHDLocation = WScript.Arguments(1)
|
|
|
>> temp1.vbs ECHO Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
|
|
|
>> temp1.vbs ECHO objXMLHTTP.open "GET", strFileURL, false
|
|
|
+>> temp1.vbs ECHO WScript.Echo "Sending request..."
|
|
|
>> temp1.vbs ECHO objXMLHTTP.send()
|
|
|
>> temp1.vbs ECHO If objXMLHTTP.Status = 200 Then
|
|
|
+>> temp1.vbs ECHO WScript.Echo "Got response. Processing body..."
|
|
|
>> temp1.vbs ECHO Set objADOStream = CreateObject("ADODB.Stream")
|
|
|
>> temp1.vbs ECHO objADOStream.Open
|
|
|
>> temp1.vbs ECHO objADOStream.Type = 1
|
|
|
@@ -70,9 +73,11 @@ cd %~dp0
|
|
|
>> temp1.vbs ECHO Set objFSO = Createobject("Scripting.FileSystemObject")
|
|
|
>> temp1.vbs ECHO If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
|
|
|
>> temp1.vbs ECHO Set objFSO = Nothing
|
|
|
+>> temp1.vbs ECHO WScript.Echo "Saving result to a file..."
|
|
|
>> temp1.vbs ECHO objADOStream.SaveToFile strHDLocation
|
|
|
>> temp1.vbs ECHO objADOStream.Close
|
|
|
>> temp1.vbs ECHO Set objADOStream = Nothing
|
|
|
+>> temp1.vbs ECHO WScript.Echo "Success."
|
|
|
>> temp1.vbs ECHO End if
|
|
|
>> temp1.vbs ECHO Set objXMLHTTP = Nothing
|
|
|
|