From bf218fdd96c0047fd528ee060276e4096b8f452a Mon Sep 17 00:00:00 2001 From: Martin Wiethan <47688561+Marterich@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:08:26 +0200 Subject: [PATCH] Remove Winutil ForceInstall and unnecessary loading bar --- scripts/main.ps1 | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 23978ab7..4886857a 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -133,9 +133,17 @@ $sync.keys | ForEach-Object { # Load computer information in the background Invoke-WPFRunspace -ScriptBlock { - $sync.ConfigLoaded = $False - $sync.ComputerInfo = Get-ComputerInfo - $sync.ConfigLoaded = $True + try{ + $oldProgressPreference = $ProgressPreference + $ProgressPreference = "SilentlyContinue" + $sync.ConfigLoaded = $False + $sync.ComputerInfo = Get-ComputerInfo + $sync.ConfigLoaded = $True + } + finally{ + $ProgressPreference = "Continue" + } + } | Out-Null #=========================================================================== @@ -145,9 +153,6 @@ Invoke-WPFRunspace -ScriptBlock { # Print the logo Invoke-WPFFormVariables -# Install Winget if not already present -Install-WinUtilWinget - # Set the titlebar $sync["Form"].title = $sync["Form"].title + " " + $sync.version # Set the commands that will run when the form is closed