Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Where to save chrome, and the URL of the chrome EXE.
- strHDLocation = "c:\ChromeStandaloneSetup.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"
- ' 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 strHDLocation
- Set objFSO = Nothing
- objADOStream.SaveToFile strHDLocation
- objADOStream.Close
- Set objADOStream = Nothing
- End if
- Set objXMLHTTP = Nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement