Remove Winutil ForceInstall and unnecessary loading bar

This commit is contained in:
Martin Wiethan 2024-06-12 21:08:26 +02:00
parent b8d120b4ee
commit bf218fdd96

View File

@ -133,9 +133,17 @@ $sync.keys | ForEach-Object {
# Load computer information in the background
Invoke-WPFRunspace -ScriptBlock {
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