title: How can I download a file with batch file without using any external tools?
body: <p>First to clarify this question is aimed to HTTP(s) download .For FTP  may be I'll ask (and answer) another question.
  Here are <a href="https://stackoverflow.com/questions/4619088/windows-batch-file-file-download-from-a-url">some similar questions</a>  - but I want to be more precise .</p>
  
  <p>Besides excluding external tools I want the solution(s) to be applicable for the widest possible types of windows machines (including XP,Win2003,Vista which still have big enough share).
  Also as <code>WSH</code> is one of the possible options I prefer no using of temp files and everything to be packed in a single <code>.bat</code> file (which is possible with both jscript and vbscript).</p>
  
  <p>What are possible approaches.</p>
  
  <ol>
  <li>"Pure" batch solution with <a href="https://technet.microsoft.com/en-us/library/cc753856.aspx" rel="noreferrer">BITSADMIN</a> - a command line utility
  available on every windows machine .It's not pretty convenient but is an/the only option where
  no other scripting language should be used.</li>
  <li>Using WSH - Three approaches are possible - <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa382925(v=vs.85).aspx" rel="noreferrer">WinHTTP</a> , <a href="https://msdn.microsoft.com/en-us/library/ie/ms535874(v=vs.85).aspx" rel="noreferrer">MSXML2.XMLHTTP</a>
  ,<a href="https://msdn.microsoft.com/en-us/library/aa752084(v=vs.85).aspx" rel="noreferrer">InternetExlorer.Application</a> - all of them are accessible ActiveX
  objects in order of how I prefer them.WinHTTP and  MSXML2.XMLHTTP
  are pretty similar in their capabilities but WinHTTP has a
  reputation of more stable.InternetExlorer.Application is in fact
  just the Internet explorer accessible through ActiveX object and
  some UI elements are unavoidable (are they?) so I'll skip this one.</li>
  <li>Using .NET - It's possible to create a hybrid batch file with all
  the three default .NET compilers (Jscript.net , VB.Net , C#) with
  Jscript.net there is no redundant error messages so I'll prefer
  it.If we ignore the fact that there's a compiled .exe all the code
  is in one file ,so according to me this fits in the requirements :-)
  .With .NET we can use System.Net.WebClient or
  System.Net.HttpWebRequest (the WebClient relies on it) or<br>
  System.Web.HttpRequest , but for now I'll post only
  System.Net.WebClient solution.And even more same ActiveX objects
  accessible with WSH are available here too.So there are really many
  ways to dowanload a file with .Net.May be in the future I'll update
  my answer.Anyway only the Webclient is especially designed for download.</li>
  <li>Using powershell - has same possibilities as .NET but with less
  chances to be installed on all machines you can meet.So I'll skip
  this one too.</li>
  </ol>