首页 > 代码库 > VBScript 下载文件

VBScript 下载文件

 1 dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
 2 dim bStrm: Set bStrm = createobject("Adodb.Stream")
 3 xHttp.Open "GET", "http://127.0.0.1/file.exe", False
 4 xHttp.Send
 5 
 6 with bStrm
 7   .type = 1
 8   .open
 9   .write xHttp.responseBody
10   .savetofile "C:\ProgramData\file.exe", 2
11 end with

 

VBScript 下载文件