remove progress from wiget & choco install

This commit is contained in:
MyDrift 2024-07-14 02:48:36 +02:00
parent 215faa18ed
commit 2f151ea591
2 changed files with 0 additions and 5 deletions

View File

@ -14,19 +14,16 @@ function Install-WinUtilChoco {
return return
} }
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" })
Write-Host "Seems Chocolatey is not installed, installing now." Write-Host "Seems Chocolatey is not installed, installing now."
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) -ErrorAction Stop Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) -ErrorAction Stop
powershell choco feature enable -n allowGlobalConfirmation powershell choco feature enable -n allowGlobalConfirmation
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" })
} }
Catch { Catch {
Write-Host "===========================================" -Foregroundcolor Red Write-Host "===========================================" -Foregroundcolor Red
Write-Host "-- Chocolatey failed to install ---" -Foregroundcolor Red Write-Host "-- Chocolatey failed to install ---" -Foregroundcolor Red
Write-Host "===========================================" -Foregroundcolor Red Write-Host "===========================================" -Foregroundcolor Red
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" })
} }
} }

View File

@ -19,7 +19,6 @@ function Install-WinUtilWinget {
Write-Host "`nWinget is not Installed. Continuing with install.`r" -ForegroundColor Red Write-Host "`nWinget is not Installed. Continuing with install.`r" -ForegroundColor Red
} }
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" })
# Gets the computer's information # Gets the computer's information
if ($null -eq $sync.ComputerInfo){ if ($null -eq $sync.ComputerInfo){
@ -65,6 +64,5 @@ function Install-WinUtilWinget {
throw [WingetFailedInstall]::new('Failed to install!') throw [WingetFailedInstall]::new('Failed to install!')
} }
} }
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" })
} }