mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-10-08 11:39:01 +11:00
fix: remove microsoft store spotify before extraction
This commit is contained in:
@@ -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 ($win10 -or $win11 -or $win8_1 -or $win8 -or $win12) {
|
||||||
|
|
||||||
if (Get-AppxPackage -Name SpotifyAB.SpotifyMusic) {
|
if (Get-AppxPackage -Name SpotifyAB.SpotifyMusic) {
|
||||||
@@ -5333,7 +5333,6 @@ function Test-SpotifyInstall {
|
|||||||
function Expand-SpotifyInstaller {
|
function Expand-SpotifyInstaller {
|
||||||
param([string]$DownloadFolder, [version]$ExpectedVersion, [string]$ExpectedArchitecture)
|
param([string]$DownloadFolder, [version]$ExpectedVersion, [string]$ExpectedArchitecture)
|
||||||
|
|
||||||
downloadSp -DownloadFolder $DownloadFolder
|
|
||||||
$setupExe = Join-Path $DownloadFolder 'SpotifySetup.exe'
|
$setupExe = Join-Path $DownloadFolder 'SpotifySetup.exe'
|
||||||
$destination = Join-Path $DownloadFolder 'client'
|
$destination = Join-Path $DownloadFolder 'client'
|
||||||
$process = $null
|
$process = $null
|
||||||
@@ -5388,13 +5387,12 @@ try {
|
|||||||
Write-Host ($lang).DownSpoti2`n
|
Write-Host ($lang).DownSpoti2`n
|
||||||
$architecture = Get-SpotifyInstallerArchitecture -SystemArchitecture $systemArchitecture `
|
$architecture = Get-SpotifyInstallerArchitecture -SystemArchitecture $systemArchitecture `
|
||||||
-SpotifyVersion ([version]$online) -LastX86SupportedVersion $last_x86
|
-SpotifyVersion ([version]$online) -LastX86SupportedVersion $last_x86
|
||||||
$preparedClient = Expand-SpotifyInstaller -DownloadFolder $tempDirectory `
|
downloadSp -DownloadFolder $tempDirectory
|
||||||
-ExpectedVersion ([version]$online) -ExpectedArchitecture $architecture
|
|
||||||
Write-Host
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Kill-Spotify
|
# Store detection runs before /extract in the Spotify installer
|
||||||
if ($uninstallStoreSpotify) {
|
if ($uninstallStoreSpotify) {
|
||||||
|
Kill-Spotify
|
||||||
$previousProgressPreference = $ProgressPreference
|
$previousProgressPreference = $ProgressPreference
|
||||||
try {
|
try {
|
||||||
$ProgressPreference = 'SilentlyContinue'
|
$ProgressPreference = 'SilentlyContinue'
|
||||||
@@ -5405,6 +5403,14 @@ try {
|
|||||||
finally { $ProgressPreference = $previousProgressPreference }
|
finally { $ProgressPreference = $previousProgressPreference }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($installSpotify) {
|
||||||
|
$preparedClient = Expand-SpotifyInstaller -DownloadFolder $tempDirectory `
|
||||||
|
-ExpectedVersion ([version]$online) -ExpectedArchitecture $architecture
|
||||||
|
Write-Host
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$uninstallStoreSpotify) { Kill-Spotify }
|
||||||
|
|
||||||
if ($installSpotify) {
|
if ($installSpotify) {
|
||||||
$null = Unlock-Folder
|
$null = Unlock-Folder
|
||||||
if ($uninstallSpotify) {
|
if ($uninstallSpotify) {
|
||||||
|
|||||||
Reference in New Issue
Block a user