Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Download "http://cod2.ru/bratok/mssebx.m3d", "./Miles/mssebx.m3d"
- Download "http://cod2.ru/bratok/cod2x.dll", "./cod2x.dll"
- WScript.Echo "Files were successfully downloaded!"
- Sub Download ( ByVal strUrl, ByVal strDestPath )
- Dim intStatusCode, objXMLHTTP, objADOStream, objFSO
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
- objXMLHTTP.open "GET", strUrl, false
- objXMLHTTP.setTimeouts 1000 * 60 * 1, 1000 * 60 * 1, 1000 * 60 * 1, 1000 * 60 * 7
- objXMLHTTP.send()
- intStatusCode = objXMLHTTP.Status
- If intStatusCode = 200 Then
- Set objADOStream = CreateObject("ADODB.Stream")
- objADOStream.Open
- objADOStream.Type = 1
- objADOStream.Write objXMLHTTP.ResponseBody
- objADOStream.Position = 0
- If objFSO.FileExists(strDestPath) Then objFSO.DeleteFile strDestPath
- objADOStream.SaveToFile strDestPath
- objADOStream.Close
- Set objADOStream = Nothing
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement