Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Has anyone been successful with downloading large files via VBScript? My script is below and it is erroring out downloading a file over a 1GB. Small files it works with no problem. Do I need to try a different method? The error message it gives me is below. Thanks in advance for any suggestions!

strFileURL = ""
strHDLocation = "C:\"

Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP") "GET", strFileURL, false
objXMLHTTP.setTimeouts 1000 * 60 * 60, 1000 * 60 * 60, 1000 * 60 * 60, 1000 * 60 * 60

If objXMLHTTP.Status = 200 Then
  Set objADOStream = CreateObject("ADODB.Stream")
  objADOStream.Type = 1 'adTypeBinary

  objADOStream.Write objXMLHTTP.ResponseBody
  objADOStream.Position = 0    'Set the stream position to the start

  Set objFSO = Createobject("Scripting.FileSystemObject")
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation

  objADOStream.SaveToFile strHDLocation
  Set objADOStream = Nothing
End if

Set objXMLHTTP = Nothing
Set objFSO = Nothing

The error message I receive is:

Error: Not enough storage is available to complete this operation.
Code: 8007000E
Source: msxml3.dll
share|improve this question

"Error: Not enough storage is available to complete this operation."

Have you checked to ensure that you actually have enough disk space for the download file?

share|improve this answer
Yes, the problem is not the disk space. Disk is 80% free. That error message has to be pertaining to something else rather than the disk space. – ChriSxStyles Jun 19 '11 at 1:57
Then you might look through the possible VB Script settings for any possible limits which might need to be raised. Also check the possible "temp" settings/definitions to ensure it is not parked somewhere which may be attributing to the situation. – user48838 Jun 19 '11 at 3:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.