equal
deleted
inserted
replaced
24 End if |
24 End if |
25 |
25 |
26 strHDLocation = "C:\Windows\Temp\temp.zip" |
26 strHDLocation = "C:\Windows\Temp\temp.zip" |
27 |
27 |
28 ' Fetch the file |
28 ' Fetch the file |
|
29 WScript.Echo ( "Trying to download from " & strFileURL) |
29 Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") |
30 Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") |
30 objXMLHTTP.open "GET", strFileURL, false |
31 objXMLHTTP.open "GET", strFileURL, false |
31 objXMLHTTP.send() |
32 objXMLHTTP.send() |
32 |
33 |
33 If objXMLHTTP.Status = 200 Then |
34 If objXMLHTTP.Status = 200 Then |
34 WScript.Echo ( "Downloading file from " & strFileURL) |
|
35 Set objADOStream = CreateObject("ADODB.Stream") |
35 Set objADOStream = CreateObject("ADODB.Stream") |
36 objADOStream.Open |
36 objADOStream.Open |
37 objADOStream.Type = 1 'adTypeBinary |
37 objADOStream.Type = 1 'adTypeBinary |
38 |
38 |
39 objADOStream.Write objXMLHTTP.ResponseBody |
39 objADOStream.Write objXMLHTTP.ResponseBody |
58 Set objSource = objShell.NameSpace(strHDLocation).Items() |
58 Set objSource = objShell.NameSpace(strHDLocation).Items() |
59 Set objTarget = objShell.NameSpace(strOutputPath) |
59 Set objTarget = objShell.NameSpace(strOutputPath) |
60 intOptions = 16 'no user prompt |
60 intOptions = 16 'no user prompt |
61 objTarget.CopyHere objSource, intOptions |
61 objTarget.CopyHere objSource, intOptions |
62 |
62 |
63 WScript.Echo ( "Extraction successful" ) |
63 WScript.Echo ( "Success!" ) |
64 Set objShell = Nothing |
64 Set objShell = Nothing |