mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-04-02 17:32:09 +00:00
Basic code touchup
This commit is contained in:
parent
004a70fda8
commit
297ec6a4b5
@ -62,9 +62,7 @@ $downloadURL = "https://github.com/ChrisTitusTech/winutil/releases/latest/downlo
|
|||||||
# Download the WinUtil script to '$env:TEMP'
|
# Download the WinUtil script to '$env:TEMP'
|
||||||
try {
|
try {
|
||||||
Write-Host "Downloading latest stable WinUtil version..." -ForegroundColor Green
|
Write-Host "Downloading latest stable WinUtil version..." -ForegroundColor Green
|
||||||
$ProgressPreference = "SilentlyContinue"
|
|
||||||
Invoke-RestMethod $downloadURL -OutFile "$env:TEMP\winutil.ps1"
|
Invoke-RestMethod $downloadURL -OutFile "$env:TEMP\winutil.ps1"
|
||||||
$ProgressPreference = "Continue"
|
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Error downloading WinUtil: $_" -ForegroundColor Red
|
Write-Host "Error downloading WinUtil: $_" -ForegroundColor Red
|
||||||
break
|
break
|
||||||
@ -86,7 +84,7 @@ try {
|
|||||||
Write-Host "WinUtil is not running as administrator. Relaunching..." -ForegroundColor DarkCyan
|
Write-Host "WinUtil is not running as administrator. Relaunching..." -ForegroundColor DarkCyan
|
||||||
Start-Process $processCmd -ArgumentList $launchArguments -Verb RunAs
|
Start-Process $processCmd -ArgumentList $launchArguments -Verb RunAs
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Running the latest stable version of WinUtil." -ForegroundColor Green
|
Write-Host "Running the latest stable version of WinUtil." -ForegroundColor DarkCyan
|
||||||
Start-Process $processCmd -ArgumentList $launchArguments
|
Start-Process $processCmd -ArgumentList $launchArguments
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user