Download Google Chrome Bằng DOS Command Line

11 tháng 6 2015

Home » VBS » Download Google Chrome bằng DOS command line

Download Google Chrome bằng DOS command line

Bạn muốn download bằng DOS cho nó dị, sau đây mình sẽ hướng dẫn các bạn: Đầu tiên, bạn hãy ra desktop và tạo một file có tên chrome.vbs có nội dung như sau: ' This is the URL of the chrome EXE. strFileURL="https://dl.google.com/tag/s/appguid%3D%7B8A69D345-D564-463C-AFF1-A69D9E530F96%7D%26iid%3D%7BA024641A-81C0-533A-53CB-AE9534821219%7D%26lang%3Den%26browser%3D4%26usagestats3D0%26appname%3DGoogle%2520Chrome%26needsadmin%3Dfalse%26installdataindex%3Ddefaultbrowser/update2/installers/ChromeStandaloneSetup.exe" ' This is where the file will download to. strHDLocation = "c:\ChromeStandaloneSetup.exe" ' Fetch the file Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") objXMLHTTP.open "GET", strFileURL, false objXMLHTTP.send() If objXMLHTTP.Status = 200 Then Set objADOStream = CreateObject("ADODB.Stream") objADOStream.Open objADOStream.Type = 1 'adTypeBinary objADOStream.Write objXMLHTTP.ResponseBody objADOStream.Position = 0 'Set the stream position to the start Set objFSO = Createobject("Scripting.FileSystemObject") If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile Set objFSO = Nothing objADOStream.SaveToFile strHDLocation objADOStream.Close Set objADOStream = Nothing End if Set objXMLHTTP = Nothing Sau đó, trong DOS, di chuyển con trỏ đến thư mục Desktop sau đó đánh lệnh sau: cscript.exe chrome.vbs Đợi một lúc để DOS thực thi quá trình tải file C:\Users\Administrator\Desktop>cscript.exe chrome.vbs Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved. Sau đó, file tải về sẽ nằm ở ổ C:\ChromeStandaloneSetup.exe Bạn có thể sửa đổi file chrome.vbs để download một file bất kỳ với đường link được nhập iconedit

1 nhận xét:

Nặc danh nói...

Bài viết rất hay

12/6/15 11:09 SA Bài đăng Mới hơn Bài đăng Cũ hơn Trang chủ Đăng ký: Đăng Nhận xét ( Atom )

Từ khóa » Tải Chrome Bằng Cmd