Skip to content

Instantly share code, notes, and snippets.

@MaxNad
Created May 2, 2018 14:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MaxNad/17dfc6680cc5664bf332f4df5690ecad to your computer and use it in GitHub Desktop.
Save MaxNad/17dfc6680cc5664bf332f4df5690ecad to your computer and use it in GitHub Desktop.
echo Set args = WScript.Arguments > wget-bin.vbs
echo Url = args.Item(0) >> wget-bin.vbs
echo Path = args.Item(1) >> wget-bin.vbs
echo dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP") >> wget-bin.vbs
echo dim bStrm: Set bStrm = createobject("Adodb.Stream") >> wget-bin.vbs
echo xHttp.Open "GET", Url, False >> wget-bin.vbs
echo xHttp.Send >> wget-bin.vbs
echo with bStrm >> wget-bin.vbs
echo .type = 1 >> wget-bin.vbs
echo .open >> wget-bin.vbs
echo .write xHttp.responseBody >> wget-bin.vbs
echo .savetofile Path, 2 >> wget-bin.vbs
echo end with >> wget-bin.vbs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment