Skip to content

Commit

Permalink
[skip ci]Gives an option to uninstall Spotify from windows store if i…
Browse files Browse the repository at this point in the history
…t exists. (#38)

* Patch installed completely with powershell.

* Overhauled installation script

* Pause and exit on failure to create directory

* optimised powershell script by @omrisim210

* Delete BlockTheSpot.ps1

* Add files via upload

* Delete BlockTheSpot.ps1

* updated last tested version.

* Option to Uninstall windows store spotify

Co-authored-by: Animo <[email protected]>
  • Loading branch information
Nuzair46 and ohmree authored Apr 10, 2020
1 parent b0ab030 commit fb52a4f
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions BlockTheSpot.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,29 @@ Author: @rednek46
$SpotifyDirectory = "$env:APPDATA\Spotify"
$SpotifyExecutable = "$SpotifyDirectory\Spotify.exe"

Write-Host 'Stopping Spotify...'
Write-Host 'Stopping Spotify...'`n
Stop-Process -Name Spotify
Stop-Process -Name SpotifyWebHelper

if (Get-AppxPackage -Name SpotifyAB.SpotifyMusic) {
Write-Host @'
The Microsoft Store version of Spotify has been detected which is not supported.
Please uninstall it first, and Run this file again.

To uninstall, search for Spotify in the start menu and right-click on the result and click Uninstall.
'@
Pause
exit
'@`n
$ch = Read-Host -Prompt "Uninstall Spotify Windows Store edition (Y/N) "
if ($ch -eq 'y'){
Write-Host @'
Uninstalling Spotify.
'@`n
Get-AppxPackage -Name SpotifyAB.SpotifyMusic | Remove-AppxPackage
} else{
Write-Host @'
Exiting...
'@`n
Pause
exit
}
}


Push-Location -LiteralPath $env:TEMP
try {
# Unique directory name based on time
Expand Down

0 comments on commit fb52a4f

Please sign in to comment.