2021-07-02 22:55:46 +03:00
|
|
|
$url = $args[0]
|
|
|
|
|
|
|
|
Write-Host "Downloading Microsoft Edge Beta"
|
|
|
|
$wc = New-Object net.webclient
|
|
|
|
$msiInstaller = "$env:temp\microsoft-edge-beta.msi"
|
|
|
|
$wc.Downloadfile($url, $msiInstaller)
|
|
|
|
|
|
|
|
Write-Host "Installing Microsoft Edge Beta"
|
|
|
|
$arguments = "/i `"$msiInstaller`" /quiet"
|
|
|
|
Start-Process msiexec.exe -ArgumentList $arguments -Wait
|
|
|
|
Remove-Item $msiInstaller
|
|
|
|
|
2021-07-16 19:56:51 +03:00
|
|
|
$suffix = "\\Microsoft\\Edge Beta\\Application\\msedge.exe"
|
2021-07-02 22:55:46 +03:00
|
|
|
if (Test-Path "${env:ProgramFiles(x86)}$suffix") {
|
|
|
|
(Get-Item "${env:ProgramFiles(x86)}$suffix").VersionInfo
|
|
|
|
} elseif (Test-Path "${env:ProgramFiles}$suffix") {
|
|
|
|
(Get-Item "${env:ProgramFiles}$suffix").VersionInfo
|
|
|
|
} else {
|
|
|
|
write-host "ERROR: failed to install Microsoft Edge"
|
|
|
|
exit 1
|
|
|
|
}
|