From f8898404a249575abebf579215dd0253d5747a5b Mon Sep 17 00:00:00 2001 From: amd64fox Date: Fri, 25 Mar 2022 01:43:51 +0300 Subject: [PATCH] Hide Progress Bars Hide Progress Bars when uninstalling Spotify from Microsoft Store (sometimes it failed) --- Install.ps1 | 4 ++-- Install_rus.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Install.ps1 b/Install.ps1 index 2969957..7537380 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -40,17 +40,17 @@ $win8 = $win_os -match "\windows 8\b" if ($win11 -or $win10 -or $win8_1 -or $win8) { - # Remove Spotify Windows Store If Any if (Get-AppxPackage -Name SpotifyAB.SpotifyMusic) { Write-Host 'The Microsoft Store version of Spotify has been detected which is not supported.'`n $ch = Read-Host -Prompt "Uninstall Spotify Windows Store edition (Y/N) " if ($ch -eq 'y') { + $ProgressPreference = 'SilentlyContinue' # Hiding Progress Bars Write-Host 'Uninstalling Spotify.'`n Get-AppxPackage -Name SpotifyAB.SpotifyMusic | Remove-AppxPackage } else { - Read-Host "Exiting...`nPress any key to exit..." + Read-Host "Exiting..." exit } } diff --git a/Install_rus.ps1 b/Install_rus.ps1 index d5b90ce..fb634ea 100644 --- a/Install_rus.ps1 +++ b/Install_rus.ps1 @@ -40,17 +40,17 @@ $win8 = $win_os -match "\windows 8\b" if ($win11 -or $win10 -or $win8_1 -or $win8) { - # Удалить Spotify Windows Store если он есть if (Get-AppxPackage -Name SpotifyAB.SpotifyMusic) { Write-Host 'Обнаружена версия Spotify из Microsoft Store, которая не поддерживается.'`n $ch = Read-Host -Prompt "Хотите удалить Spotify Microsoft Store ? (Y/N) " if ($ch -eq 'y') { + $ProgressPreference = 'SilentlyContinue' # Скрывает Progress Bars Write-Host 'Удаление Spotify.'`n Get-AppxPackage -Name SpotifyAB.SpotifyMusic | Remove-AppxPackage } else { - Read-Host "Завершение работы скрипта...`nНажмите любую клавишу для выхода..." + Read-Host "Завершение работы скрипта..." exit } }