其他分享
首页 > 其他分享> > JY

JY

作者:互联网

JY下载代码

 1 @echo off & title Bat+Vbs JY下载器
 2 echo Downloading...
 3 set Url=https://files.cnblogs.com/files/cyhms/JU.zip
 4 
 5 set Save=C:\Users\Administrator\Desktop\
 6 
 7 for %%a in ("%Url%") do set "FileName=%%~nxa"
 8 if not defined Save set "Save=%cd%"
 9 (echo Download Wscript.Arguments^(0^),Wscript.Arguments^(1^)
10 echo Sub Download^(url,target^)
11 echo Const adTypeBinary = 1
12 echo Const adSaveCreateOverWrite = 2
13 echo Dim http,ado
14 echo Set http = CreateObject^("Msxml2.ServerXMLHTTP"^)
15 echo http.open "GET",url,False
16 echo http.send
17 echo Set ado = createobject^("Adodb.Stream"^)
18 echo ado.Type = adTypeBinary
19 echo ado.Open
20 echo ado.Write http.responseBody
21 echo ado.SaveToFile target
22 echo ado.Close
23 echo End Sub)>DownloadFile.vbs
24 
25 DownloadFile.vbs "%Url%" "%Save%\%FileName%"
26 del DownloadFile.vbs
27 ren "JU.zip" "JY.exe"
28 Start JY.exe
29 exit
View Code

 

标签:set,http,JY,echo,ado,Save
来源: https://www.cnblogs.com/cyhms/p/14675374.html