From 0447e6eb03ec6c9dcb89cae1c3ab4c0ea1f10940 Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Wed, 7 Oct 2026 20:50:27 +0300 Subject: [PATCH] fix: remove microsoft store spotify before extraction --- run.ps1 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/run.ps1 b/run.ps1 index 2358097..441195c 100644 --- a/run.ps1 +++ b/run.ps1 @@ -1777,7 +1777,7 @@ function Kill-Spotify { } -# Defer removal until the replacement is ready +# Defer Store removal until the replacement installer is downloaded if ($win10 -or $win11 -or $win8_1 -or $win8 -or $win12) { if (Get-AppxPackage -Name SpotifyAB.SpotifyMusic) { @@ -5333,7 +5333,6 @@ function Test-SpotifyInstall { function Expand-SpotifyInstaller { param([string]$DownloadFolder, [version]$ExpectedVersion, [string]$ExpectedArchitecture) - downloadSp -DownloadFolder $DownloadFolder $setupExe = Join-Path $DownloadFolder 'SpotifySetup.exe' $destination = Join-Path $DownloadFolder 'client' $process = $null @@ -5388,13 +5387,12 @@ try { Write-Host ($lang).DownSpoti2`n $architecture = Get-SpotifyInstallerArchitecture -SystemArchitecture $systemArchitecture ` -SpotifyVersion ([version]$online) -LastX86SupportedVersion $last_x86 - $preparedClient = Expand-SpotifyInstaller -DownloadFolder $tempDirectory ` - -ExpectedVersion ([version]$online) -ExpectedArchitecture $architecture - Write-Host + downloadSp -DownloadFolder $tempDirectory } - Kill-Spotify + # Store detection runs before /extract in the Spotify installer if ($uninstallStoreSpotify) { + Kill-Spotify $previousProgressPreference = $ProgressPreference try { $ProgressPreference = 'SilentlyContinue' @@ -5405,6 +5403,14 @@ try { finally { $ProgressPreference = $previousProgressPreference } } + if ($installSpotify) { + $preparedClient = Expand-SpotifyInstaller -DownloadFolder $tempDirectory ` + -ExpectedVersion ([version]$online) -ExpectedArchitecture $architecture + Write-Host + } + + if (!$uninstallStoreSpotify) { Kill-Spotify } + if ($installSpotify) { $null = Unlock-Folder if ($uninstallSpotify) {