title: Download and save a webpage using vbscript
body: <p>I am trying to give users the option to download and save a webpage to where ever they want. I have been looking all over for a solution but nothing seems to be working. I am using vbscript in classic asp. </p>
  
  <p>This is what I tried last</p>
  
  <pre><code>dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
  dim bStrm: Set bStrm = createobject("Adodb.Stream")
  xHttp.Open "GET", "" &amp;Session("ServerURL") &amp; "/idautomation/IDAutomationStreamingLinear.aspx?D=MAPS$"&amp;request.QueryString("catcode")&amp;"%25"&amp;request.QueryString("typecode")&amp;"&amp;X=0.09&amp;BH=3&amp;S=0&amp;CC=T&amp;LM=5&amp;TM=7.5&amp;ST=F", False
  xHttp.Send
  
  with bStrm
      .type = 1 '//binary
      .open
      .write xHttp.responseBody
      .savetofile "d:\DownloladPdf.pdf", 2 '//overwrite
  end with
  </code></pre>
  
  <p>but its throwing a "Write to file failed. " on the .savetofile line.</p>
  
  <p>I want the user to be able to chose where to save it to...</p>