[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 $OutputEncoding = [System.Text.Encoding]::UTF8 winget source remove msstore 2>$null $apps = @( "Microsoft.PowerShell", "VideoLAN.VLC", "Foxit.FoxitReader", "Python.Python.3.14", "Greenshot.Greenshot", "Google.Chrome" ) $jobs = $apps | ForEach-Object { $id = $_ Start-Job -ScriptBlock { param($appId) if ($appId -eq "Google.Chrome") { Get-Process -Name "chrome" -ErrorAction SilentlyContinue | Stop-Process -Force Start-Sleep -Seconds 2 } $commonArgs = "--accept-source-agreements", "--accept-package-agreements", "--silent" $installed = winget list --id $appId 2>$null | Select-String $appId if ($installed) { winget upgrade --id $appId @commonArgs } else { winget install --id $appId @commonArgs } } -ArgumentList $id } $jobs | Wait-Job | Receive-Job $jobs | Remove-Job Write-Host "All tasks complete!" Read-Host "Press Enter to exit"