作者:miya的发现王国sGA_998 | 来源:互联网 | 2023-10-16 11:20
JY下载代码1@echooff&titleBat+VbsJY下载器2echoDownloading3setUrlhttps:files.cnblogs.comfilescyh
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