mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-15 17:30:37 -06:00
error handling
This commit is contained in:
parent
5cfcd36138
commit
bb51a7ef90
@ -117,10 +117,15 @@ Function Uninstall-WinUtilEdgeBrowser {
|
|||||||
function Install-Edge {
|
function Install-Edge {
|
||||||
$tempEdgePath = "$env:TEMP\MicrosoftEdgeSetup.exe"
|
$tempEdgePath = "$env:TEMP\MicrosoftEdgeSetup.exe"
|
||||||
|
|
||||||
|
try {
|
||||||
write-host "Installing Edge"
|
write-host "Installing Edge"
|
||||||
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2109047&Channel=Stable&language=en&consent=1" -OutFile $tempEdgePath
|
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2109047&Channel=Stable&language=en&consent=1" -OutFile $tempEdgePath
|
||||||
Start-Process -FilePath $tempEdgePath -ArgumentList "/silent /install" -Wait
|
Start-Process -FilePath $tempEdgePath -ArgumentList "/silent /install" -Wait
|
||||||
Remove-item $tempEdgePath
|
Remove-item $tempEdgePath
|
||||||
|
write-host "Edge Installed Successfully"
|
||||||
|
} catch {
|
||||||
|
write-host "Failed to install Edge"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action -eq "Install") {
|
if ($action -eq "Install") {
|
||||||
|
Loading…
Reference in New Issue
Block a user