/build/static/layout/Breadcrumb_cap_w.png
10/04/2018 2218 views

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.

Answer Summary:
0 Comments   [ + ] Show comments

Comments


Answer Chosen by the Author

1
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
Answered 10/10/2018 by: kitco
White Belt

  • That really works! Thank you!
    • You're welcome

      see my post edit

Community Chosen Answer

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.


Answered 10/04/2018 by: Channeler
Red Belt

  • 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".

All Answers

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!

Answered 10/10/2018 by: SGV AG
Senior White Belt

This content is currently hidden from public view.
Reason: Determined to be spam through moderation For more information, visit our FAQ's.