http - Command line download large (500+mb) file using vbscript -
heart of problem: i'm trying download 650mb file using vbscript. file on 500mb fails following error...
error: not enough storage available complete operation code: 8007000e
source: msxml3.dll
<-- when using msxml.xmlhttp or...
source: winhttp.winhttprequest
<-- when using winhttp
i'm using code from here, both msxml.xmlhttp , winhttp (not wget). both scripts can watch in task manager build on 650mb, , fail above error. scripts work, if choose smaller files download occurs fine.
the lines referenced in error messages .write objhttp.responsebody
both.
i've found few other people having same problem, although there doesn't seem large amount of people trying download giant files vbscript... can't imagine why.
i know it's not space issue (i have plenty of hard drive space), or memory issue (i have 4gb, physical memory shows 70% @ peak). i've tried setting settimeouts option detailed here when using winhttp (i set them -1, infinite timeout), , tried using msxml.serverxmlhttp allows settimeouts well, both no-go
background: i'm trying write vbscript automatically download , install set of software large number of users. because it's going distributed many people natively in windows, since don't know other software may or may not have. limits options quite bit. powershell policy set restricted, can't use on others computers, not without detailing how reset them defeats purpose of script that's supposed non-techie users. pretty leaves vbscript.
if there no other way this, next step going to automate downloading , installation of smaller file, wget, , use download larger one. again though, i'd minimum, native software. seems should possible, can't find solution.
edit: can't post more 2 links new user, you're going have take word i've found other people having issue, no answers threads (here or anywhere else).
i cannot reproduce problem, i'm unable provide solution. however, may able work around downloading file in chunks instead of whole:
chunksize = 524288000 '500 mb url = "..." set stream = createobject("adodb.stream") stream.open stream.type = 1 'binary = 0 first = * chunksize last = first + chunksize - 1 set req = createobject("msxml2.xmlhttp.6.0") req.open "get", url, false req.setrequestheader "range", "bytes=" & first & "-" & last req.send if req.status = 206 stream.write req.responsebody = + 1 loop until clng(req.getresponseheader("content-length")) <> chunksize stream.savetofile "c:\path\to\output.file", 2 stream.close
Comments
Post a Comment