diff --git a/functions/private/Install-WinUtilChoco.ps1 b/functions/private/Install-WinUtilChoco.ps1 index 7c026945..7c8de564 100644 --- a/functions/private/Install-WinUtilChoco.ps1 +++ b/functions/private/Install-WinUtilChoco.ps1 @@ -14,19 +14,16 @@ function Install-WinUtilChoco { return } - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" }) 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 powershell choco feature enable -n allowGlobalConfirmation - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" }) } Catch { Write-Host "===========================================" -Foregroundcolor Red Write-Host "-- Chocolatey failed to install ---" -Foregroundcolor Red Write-Host "===========================================" -Foregroundcolor Red - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" }) } } diff --git a/functions/private/Install-WinUtilWinget.ps1 b/functions/private/Install-WinUtilWinget.ps1 index 28a761b9..1312b0e3 100644 --- a/functions/private/Install-WinUtilWinget.ps1 +++ b/functions/private/Install-WinUtilWinget.ps1 @@ -19,7 +19,6 @@ function Install-WinUtilWinget { 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 if ($null -eq $sync.ComputerInfo){ @@ -65,6 +64,5 @@ function Install-WinUtilWinget { throw [WingetFailedInstall]::new('Failed to install!') } } - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" }) }