/build/static/layout/Breadcrumb_cap_w.png

Uninstalling Spotify

Has anyone encountered the uninstall command switch for SpotifySetup.exe or any other method to unattendely uninstall Spotifiy?

When i use /uninstall the uninstallation starts, nevertheless a dialog asks the user "Are you sure you want to uninstall Spotify?"
Switches like "/qu" ; "/quninstall" ; "/uninstall /yes" don't work.
Im trying to uninstall it silently, so the user doesn't even see a message.

So far, at least, I was able to copy the SpWebInst0.exe from %appdata%\Spotify although does not solve my problem yet.

Thank you for your appreciated help.


0 Comments   [ + ] Show comments

Answers (4)

Answer Summary:
Posted by: Channeler 5 years ago
Red Belt
3
I was googling around, could not find any silent removal parameters, maybe Spotify guys don't want to help IT guys to prevent their service from being used.

This is the best I could locate, a Powershell Script:

https://www.reddit.com/r/SCCM/comments/5ipfql/spotify_removal_script/


Very well documented.



Comments:
  • Thank you. You put me on the right track. That PS-Script works indeedly.
    In order to run that in KACE, I first start a Online-Shell-Script (script.bat) including:
    powershell.exe -nologo -executionpolicy bypass -noprofile -file uninstall.ps1
    In Dependendies I put that "uninstall.ps1". - SGV AG 5 years ago
Posted by: kitco 5 years ago
White Belt
1

Top Answer

Try out this:
"C:\Users\Admin\AppData\Roaming\Spotify\Spotify.exe" /UNINSTALL /SILENT

If you want an easy installation/deinstallation, then use the Offline Installer with following parameters to install:

SpotifyFullSetup.exe /PROGRAM_FILES /SILENT

This install spotify in C:\Program Files(x86)\Spotify
Thats usually much better. Better to install/uninstall as local system in an evironment with e.g SCCM.

And then uninstall:

"C:\Program Files (x86)\Spotify\Spotify.exe" /UNINSTALL /SILENT

Comments:
  • That really works! Thank you! - SGV AG 5 years ago
    • You're welcome

      see my post edit - kitco 5 years ago
Posted by: SGV AG 5 years ago
Senior White Belt
1

Solution A:
%APPDATA%\Spotify\Spotify.exe /UNINSTALL /SILENT

Solution B:
1. In order to run this in KACE as a script start an Online-Shell-Script (script.bat) containing:
powershell.exe -nologo -executionpolicy bypass -noprofile -file uninstall.ps1


2. In Dependendies add "uninstall.ps1" containing following PS-Script:
# set working directory
$CurrentLocation = Split-Path -Parent $MyInvocation.MyCommand.Path;

# end running processes
$RunningApp = Get-Process -Name "spotify*"
If ($RunningApp) {
    Stop-Process -InputObject $RunningApp -Force
}

# manually delete spotify for each user
$UserFolders = Get-ChildItem -Directory "c:\users"
ForEach ($Folder in $UserFolders) {
    $WorkingDir = "C:\\Users\\" + "$Folder"
    If (Test-Path $WorkingDir\appdata\roaming\spotify) {
        Start-Process -FilePath $WorkingDir\appdata\roaming\spotify\spotify.exe -ArgumentList "/uninstall /silent"
        Start-Sleep -s 10
        Remove-Item $WorkingDir\appdata\roaming\spotify -Force -Recurse
        Remove-Item $WorkingDir\appdata\local\spotify -Force -Recurse
        Remove-Item $WorkingDir\desktop\spotify.lnk -Force -Recurse
    }
}

# remove leftover listing in programs and features
$UserKey = Get-ChildItem -Path Microsoft.PowerShell.Core\Registry::HKEY_USERS

ForEach ($Key in $UserKey) {
    If (Test-Path Microsoft.PowerShell.Core\Registry::\$Key\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Spotify) {
        Remove-Item Microsoft.PowerShell.Core\Registry::\$Key\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Spotify -Force -Recurse
    }
}


Thank you Channeler and kitco for your great help!

Posted by: anonymous_152121 3 years ago
White Belt
0

Try with powershell

$RunningApp =Get-Process -Name "spotify*"

If ($RunningApp){Stop-Process -InputObject $RunningApp -Force}

Get-AppPackage -NAMESpotifyAB.SpotifyMusic | Remove-AppPackage


This will stop the process and then uninstall it, something interesting that we found is that the application is installed in C:\Program Files\WindowsApps and that is a folder to which you do not have permission.




 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ