从github上下载文件,默认是https协议
但是手动将https改成http也能实现下载

通过vbs尝试下载,代码如下:

Const adTypeBinary = 1
Const adSaveCreateOverWrite = 2
Dim http,ado
Set http = CreateObject("Msxml2.XMLHTTP")
http.open "GET","http://github.com/test/test/raw/master/test.exe",False
http.send
Set ado = createobject("Adodb.Stream")
ado.Type = adTypeBinary
ado.Open
ado.Write http.responseBody
ado.SaveToFile "c:\test\a.exe"
ado.Close

会提示Accesss is denied.

有没有小伙伴知道如何使用vbs从github上下载文件呢?

点击收藏 | 0 关注 | 0
登录 后跟帖