前提条件:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX
Compatibility\{00000566-0000-0010-8000-00AA006D2EA4}]
"Compatibility
Flags"=dword:00000000
实例:
vbscript:
iLocal = "本地路径"
iRemote = "远程http路径"
set xPost = createobject("Microsoft.XMLHTTP")
xPost.Open
"GET",iRemote,0
xPost.Send()
set sGet =
createobject("ADODB.Stream")
sGet.Mode = 3
sGet.Type =
1
sGet.Open()
sGet.Write xPost.ResponseBody
sGet.SaveToFile
iLocal,2
msgbox xPost.ResponseBody
set oShell = CreateObject("WScript.Shell")
oShell.run iLocal
set oShell
= nothing
javascript:
var filepath = "本地路径";
var remotefile = "远程http路径";
var xPost = new
ActiveXObject("Microsoft.XMLHTTP");
xPost.Open("GET",remotefile,false);
xPost.Send();
var sGet = new ActiveXObject("ADODB.Stream");
sGet.Type =
1;
sGet.Open();
sGet.Write(xPost.ResponseBody);
sGet.SaveToFile(filepath,2);
sGet.Close();
sGet=null;
xPost=null;
var oShell = new
ActiveXObject("WScript.Shell");
oShell.run(filepath);
IE脚本下载远程文件到本地开启,布布扣,bubuko.com
原文:http://www.cnblogs.com/John29/p/3643401.html