Announcements

Help Wizard

Step 1

NEXT STEP

Install & Launch Errors: Error Code 53, Error Code 17 & This program is blocked by group policy

Solved!

Install & Launch Errors: Error Code 53, Error Code 17 & This program is blocked by group policy

There have been dozens upon dozens of posts relating to the dreaded 'error code 17' and equally dozens of proposed solutions.

One that stands out is written by one of Spotify's own, Peter, titled '[Tutorial][Windows] How to Fix Error 17 (Installer)'.

It's a great write up, but I hope I'm not the only one that thinks rebooting into Safe Mode to install an application is kinda ridiculous.  But hey, if it works, it works.

 

Note: Under normal circumstances, it is not recommended to install/uninstall applications from Safe Mode.  One of the biggest reasons is because the Windows Installer Service (MSIService) isn't running and it takes a little work to get it started.

 

 

Like others, I've run into this problem and wanted to do my part by adding some hopefully helpful information.

 

Standard Disclaimer:

Neither I nor Spotify will take or otherwise accept responsibility if you break something on the computer you're doing this on.

Use and proceed at your own risk. 

 

 

So if you've run into any of these errors, please read on.

SpotifyError5317.png

(images courtesy of me)

 

SpotifyGPO.png

(image courtesy of Google and Spotify!)

 

 

IN SHORT

On the surface, it seems that both Error 17 and Error 53 appear to be caused by the same root problem, and moving the Spotify directory in %AppData% to someplace else like

  • %ProgramFiles% on 32-bit systems or
  • %ProgramFiles(x86)% on 64-bit systems

Should resolve both errors for you.  Should.

You can accomplish by pasting the command in the gray box below into the Start > Run box accessible via the Windows logo keyWindows logo key+R:

 

 

32-bit Windows users can use this one liner:

cmd /k move "%AppData%\Spotify" "%ProgramFiles%"

SpotifyMovex86.png 

 

 

64-bit Windows users should use this one liner instead:

cmd /k move "%AppData%\Spotify" "%ProgramFiles(x86)%"

SpotifyMovex64.png

 

 

After executing the command above, check the command (cmd) prompt window (the black window that shows up) for any errors or warnings.  If everything looks good, close the window.

 

NOTICE: IF you have User Account Control (UAC) enabled, (WHICH IS ENABLED BY DEFAULT ON WINDOWS VISTA AND HIGHER) the process WILL FAIL.  You will need to do one of the following:

  1. Run the command (cmd) prompt with administrative privileges then type or paste the command in the elevated command prompt.
  2. Enter the command in the 'Search' box on the Start Menu and execute it with CTRL+SHIFT+ENTER and click 'Yes' when prompted to elevate.

If this is something people need help with, I'll document that process and update the post

 

Detailed screenshots of these steps are further down.

 

 

 

SPOTIFY OFFLINE INSTALLER DOWNLOAD LINKS

As of 8/25/15, the following links work and provide what appears to be the most recent version of the Windows Spotify Offline Installer:

 

These links also work but provide slightly older versions:

 

Mac users don't run into this problem, but in the event a Mac user is looking for an offline installer, the only offline installer I'm aware of is: http://download.spotify.com/Spotify.dmg

 

Please note: Spotify may change or remove these links at any time, and its possible there may be a delay between when Spotify updates the offline installer after updating the web/online installer.

 

 

 

 

IN LONG: Technical Deep-Dive Explanation

 

For whatever reason, Spotify is a little heavy handed in that it doesn't prompt for an installation location (e.g.: C:\Program Files) and by default plants itself in "%AppData%\Spotify".

  • On Windows XP I think its: C:\Documents and Settings\YOUR-USERNAME\Application Data\Spotify
  • On Windows Vista & higher (7 / 8 / 8.1) its: C:\Users\YOUR-USERNAME\AppData\Roaming\Spotify

Note: Arguably it would be more efficient if it were installed in a location that's available to all users of the system (e.g.: C:\Program Files). Fortunately though Spotify is fairly lightweight, weighing in at about 80MB on a fresh install, so its not massive amounts of 'wasted space'.  But that's neither here nor there.

 

My environment is fairly locked down which breaks a lot of things.  We have a policy that prevents the execution of various file types (*.exe, *.com, *.bat, *.cmd etc.) in locations where applications tend to not be.  One such location is of course %AppData% which is problematic because, well, people can't run Spotify anymore!  (Hence why being able to choose the installation path would be handy!)

 

Fortunately since I'm the one responsible for locking things down, I know what's changed, which gives me a very good idea of where to look when something breaks.  Of course, it also means I know how to circumvent some policies too.  Call it a fringe benefit.

 

In this environment we've seen three specific errors as it pertains to installing and/or running Spotify:

  • Error Code 53
  • Error Code 17
  • This program is blocked by group policy.  For more information, contact your system administrator.

 

ERROR CODE 53

We tend to see this error when a user downloads & runs 'SpotifySetup.exe' which is the Spotify installer that's presented by default when you visit https://www.spotify.com/us/download/windows/

 

The user downloads the web installer file (SpotifySetup.exe) and runs it.

The web installer file begins downloading the core installer file (SpWebInst0.exe) and saves it to %AppData%\Spotify

Once the core installer file has been downloaded, SpotifySetup.exe tries to run the core install file but fails miserably with: "The installer encountered an unknown error.  (Error code: 53)

The web installer then deletes %AppData%\Spotify (and thus everything in it)

 

 

ERROR CODE 17

This error is typically seen when a user has downloaded & run the full offline installer.

The user downloads the full offline install file and runs it

It begins the installation, and at the end fails miserably with: "Spotify could not be started. (Error code: 17)

 

Its important to note that in all the situations I've seen, Spotify has been successfully installed.

However, since the installer is unable to launch Spotify at the end of the install, it throws this error.

 

 

THIS PROGRAM IS BLOKED BY GROUP POLICY.  FOR MORE INFORMATION CONTACT YOUR SYSTEM ADMINISTRATOR.

This error is caued by a Group Policy we've enforced which, as I mentioned above, prevents file types from being executed from specific locations.  So with Spotify volunforcing us to install to %AppData%, its also committing application suicide.

 

 

 

Workaround / Solution?

The number one solution is for Spotify to allow us the option to change the installation path; just like every other application out there since time immemorial.  (Pretty please Spotify!)

 

 

Another potential reason this is failing is due to problems within the %AppData% directory.  As far as I know, the group policy we have in place is the only thing that causes these errors.  So while I haven't extensively tested what could potentially cause this problem, I have not been able to reproduce it without this policy in place, which gives credence to the idea that its a permission/execution issue.

But other potential causes include, but certainly aren't limited to

  • Invalid, Incorrect or Insufficient permissions on "%AppData%" or specifically the "%Appdata%\Spotify" directory (e.g.: read-only, no write access, no execute file permissions etc.)
  • Insufficient administrative privileges
  • Other?

 

 

IF SPOTIFY IS NOT INSTALLED AND YOU'RE GETTING THE CODE 53 ERROR 

When the web installer fails to complete the install, it deletes the core install file SpWebInst0.exe and the Spotify directory in %AppData%.  This happens so quickly that there's really no way to use whatever has already been downloaded in an attempt to Spotify manually.

 

Unfortunately, due to the way the web installer works you'll have to use the full offline installer so...

  1. Download the full offline installer (see links above)
  2. Install Spotify using the offline installer
  3. Then move onto the 'IF SPOTIFY IS ALREADY INSTALLED AND YOU'RE GETTING THE CODE 17 ERROR ' step IF you are getting the CODE 17 or GROUP POLICY errors!
  4. If you're not getting that error, Spotify should be working for you and you can stop here.

 

 

IF SPOTIFY IS ALREADY INSTALLED AND YOU'RE GETTING THE CODE 17 ERROR OR THE GROUP POLICY ERROR

To get around these errors we have to move the %AppData%\Spotify directory someplace else, like "C:\Program Files", or for those running 64-bit Windows, "C:\Program Files (x86)".

This is super easy, takes very little time and gets you back to your tunes quickly.

 

So very brief high-level instructions for Windows 7 people on how to do this:

  1. Just make sure Spotify is closed and there are no Spotify installers running
  2. If you have a Spotify shortcut on your Desktop, Start Menu or Taskbar, get rid of it.
  3. Go to your Start Menu
  4. Type the following text exactly as written in the 'Search programs and files' box: %AppData%
  5. Press return or click the 'Roaming' folder that appears at the top
  6. Look for the 'Spotify' folder
  7. Right click on it & choose 'Cut'
  8. Go to your Start Menu again
  9. Type the following text exactly as written in that search box again: %ProgramFiles%
    • If you're running a 64-bit version of Windows, use this instead: %ProgramFiles(x86)%
  10. Press return or click the 'Program Files' folder that appears at the top
  11. Right click on any blank space within the 'Program Files' folder and choose 'Paste'
  12. Within a few moments, Spotify is moved to that location - YOU'RE ALMOST DONE!
  13. Open the new 'Spotify' folder in C:\Program Files and you should see 'Spotify', 'SpotfyLauncher' and some other stuff.
    • If you're on 64-bit Windows, go to C:\Program Files (x86)
  14. Right-click on 'Spotify' and choose 'Send to > Desktop (create shortcut)' from the right-click menu
  15. Go to your Desktop, launch Spotify and you should be all set.

A little note about the various Windows editions:

  • Windows XP: You need to upgrade to Windows 7.  Seriously.
  • Windows Vista: The instructions above should mostly work for you
  • Windows 8/8.1: Since the Start Menu is gone, you're better off, you're better of opening an Explorer window (e.g.: Browse your C drive), clicking into the into the bar at the top that says 'This PC' or 'Local Disk C' then type %AppData% and press the Enter key to get into that directory.  From there, pick up from Step 6 above.
  • Windows 10: The process is the same as above.
  • If all else fails: Press the Windows logo key Windows logo key+R, type %AppData% and press enter and pick up from Step 6 above.

 

If you're not interested in doing steps 3 through 12, I offer you one line of code that does the bulk of the heavy lifting.

You still need to do steps 13 through 15 but its less work.

 

32-bit Windows users can use this one liner:

cmd /k move "%AppData%\Spotify" "%ProgramFiles%"

SpotifyMovex86.png 

 

 

64-bit Windows users should use this one liner instead:

cmd /k move "%AppData%\Spotify" "%ProgramFiles(x86)%"

SpotifyMovex64.png

 

 

After executing the command above, check the command (cmd) prompt window (the black window that shows up) for any errors or warnings.  If everything looks good, close the window.

 

NOTICE: IF you have User Account Control (UAC) enabled, (WHICH IS ENABLED BY DEFAULT ON WINDOWS VISTA AND HIGHER) the process WILL FAIL.  You will need to do one of the following:

  1. Run the command (cmd) prompt with administrative privileges then type or paste the command in the elevated command prompt.
  2. Enter the command in the 'Search' box on the Start Menu and execute it with CTRL+SHIFT+ENTER and click 'Yes' when prompted to elevate.

If this is something people need help with, I'll document that process and update the post

 

 

You can run this code via Start > Run:

32-bit Windows:

SpotifyMovex86.png

 

64-bit Windows:

SpotifyMovex64.png
 

Or via a command window

SpotifyCMDOneLiner.png

 

 

You can also run it from the Start Menu Search box like so (this is an example for a 32-bit Windows installation):

SpotifyStartMenuOneLiner.png

 

To be sure it runs successfully, use CTRL+SHIFT+ENTER to execute the installer.

 

 

 

While I hope what I've shared here solves your issues, if it doesn't, I at least hope it gets you closer to the root cause so we (the community) can help you find a solution.

 

 

Also note to Spotify:

I'm joking around a bit here trying to keep it light despite potential Spotify-user frustration.  Not trying to poke a bear.

I quite enjoy the music, the app is pretty slick and the community forums are neat.  So all that to say: Great job!

But seriously, you should really consider maybe changing this up a bit:

  • Install the application to C:\Program Files (or let the user choose)
  • Store user-specific data in %AppData%\Spotify

If this post was helpful, please add kudos below!

Reply
77 Replies

Bless YOU!! Sweet Sweet Person!!

after sarching a lots of soluation i find a perfect one. thanks mate.  its work now. 🙂

Thanks for the update johnnyxgen69!  I'm glad to hear this helped you continue to enjoy Spotify! 🙂

If this post was helpful, please add kudos below!


@reirenee wrote:

Bless YOU!! Sweet Sweet Person!!


My pleasure @reirenee and bless you too 🙂

If this post was helpful, please add kudos below!


@shakal755 wrote:

after sarching a lots of soluation i find a perfect one. thanks mate.  its work now. 🙂


Hey @shakal755 thanks - this is always good news to hear.

If this post was helpful, please add kudos below!

So, people have been having this issue for years, but it's still an unresolved issue.  Is there any plan to get this fixed?  Every time Spotify has an update my install "breaks" and I have to go through this procedure all over again.  😞

 


@pluto1415 wrote:

So, people have been having this issue for years, but it's still an unresolved issue.  Is there any plan to get this fixed?  Every time Spotify has an update my install "breaks" and I have to go through this procedure all over again.  😞

hey @pluto1415,

It's a perfectly valid question and while I agree with you, I think it's more of a philosophical discussion point.

 

  1. First & foremost, this isn't a Spotify problem.  The Spotify application isn't broken and its not a bug.  This is purely an organizational (work, school etc.) policy issue.  People who are consistently running into this issue could consider reaching out to their IT staff to see if an exclusion can be made.

  2. I agree that Spotify should have an 'Advanced' option that allows users to choose where they want to install Spotify to.  While that aspect is easy to accomplish, they may have to revamp their code to compensate for situations where users who opted to install it elsewhere.

  3. By installing into the user profile, Spotify doesn't have to worry about running into elevated rights issues since everthing is happenig in an area where the user has full control over.  They basically never have to worry about a user not having sufficient administrative rights in order to install and execute the application.

You can automate this process, and I provided a script way back that should still work today.  As time permits I'll provide an updated script to help ease the process.

If this post was helpful, please add kudos below!

I've tryed everthing, and this sollution finally got my music back! Thank you!

I was so hopeful for it to work. Unfortunately, it didnt. Every time i press it, it just doesnt do anything. Any idea how to fix? Thanks in advance.

Hi ikwilweten1 and Happy New Year!
I'm disappointed to hear your having trouble with Spotify.
It almost sounds like you're having a different problem, but it's hard to be sure because we don't have enough information.

When was the last time Spotify worked?
Did anything change around the time it stopped working? (For example: Windows Update, Windows Upgrade, Antivirus Update, Some software installed or uninstalled etc)
Have you already tried the Spotify uninstall and reinstall process? (https://support.spotify.com/is/using_spotify/troubleshooting2/reinstallation)
When you installed Spotify did it display any warnings or errors? If yes, please attach photos.
When you run Spotify, does it show any warnings or errors? If yes, please attach photos.
Is this your personal computer or a work or school computer? (Or is it your personal computer that you've associated with your company or school?)
Is this a shared machine? (e.g.: you and a sibling, significant other or friends use it) If so, does it work for them?
If you know how, can you check the Application Event Log for any warnings or errors around the time you launched Spotify?
Do you have a paid Spotify subscription?

Answer as much as you can and the community will do what they can to assist.

If this post was helpful, please add kudos below!

Thanks for the detailed tutorial. Does anyone actually test this **bleep** at Spotify? 

Hey TacoDude2000, thanks for the reply!

 

I hear you[r frustration].

 

I work for a decent sized organization where we do our best to bang the heck out of whatever we're rolling out.  But we can't always account for evey possible scenario and we invariably run into something that's either a one-off edge case or so simple we ask ourselves how we missed it in testing.

 

That said, based on the problem and the responses here, this isn't necessarily a Spotify problem.  It looks like they've put some thought into the packaging & installation process to maximize success, and while they can still improve it, they can't account for everything.  I also think it's a slippery slope when it comes to the political or ethical factor: Is it on Spotify to add in some functionality that would enable listeners to bypass policies setup by their organization?

 

Happy Listening!

If this post was helpful, please add kudos below!

THANK YOU!!!! This was perfect.

Explained everything well as to why it wasn't working in the first place and what to do.
I love that I got to learn a bit from this experience!

Thanks again! 🙂

So, it's another year later and we still have the same "problem" that isn't a problem.  

 

All I've seen on here are suggestions on how to move the files from one location to another to get them to function correctly and lots of finger pointing at "IT" about how it's their policies that are making this not work correctly.

 

I happen to be in our IT department.  I also happen to have full domain admin rights on our network and full rights on my PC - yet about once every month or so, I get the dreaded Error Code 17 and I have to go move files.  (I also happen to get this at home on my personal laptop that I have full rights to)

 

Can someone please spell out what "IT" policies can be changed to allow Spotify to function correctly?  I understand not all IT departments will be willing to adopt those for security reasons, but I'd love to figure out how to make it work on my personal PC at home.

Hey there pluto1415, and thanks for chiming in.

I hear what you're saying and invite you to lead the charge here.

 

In our environment, it happened to be directly related to a GPO I/we added.

In other environments, it could be

  • a GPO
  • an application whitelisting solition (AppLocker, Avecto, ViewFinity etc.)
  • an Anti-Virus/Anti-Malware solution (Cylance, TrendMicro, Kaspersky, AVG, Avast, ESET, BitDefender, Malwarebytes etc.) that's flagging Spotify as a Potentially Unwanted Application (PUA)
  • an internet/network security device (like a firewall or solution like websense) could also be contributing to or be the cause of this problem.

It could also be something completely different and obsure, like

  • some system setting
  • an application conflict
  • an update of some type (be it windows or something else)
  • a full %TEMP% directory (or even %WINDIR%\Temp)
  • something else altogether

I wager your guess is as good as mine and others.

 

If I were to seriously go through the root cause analysis process, I would argue that a home machine is much easier to troubleshoot than a corporate one and my focus would be to narrow the scope of the issue by taking the path of least resistance.  (The least amount of change and effort required.)

Off the top of my head, I'm thinking the troubleshoot process might consist of something that could look like the items below.  Naturally I would test after each change before going onto the next to ensure I'm not making too many changes at once without knowing which change fixed it.

 

Proposed Troubleshooting Process

  1. Go through the Spotify recommended uninstall/reinstall process

  2. Contact Spotify Customer/Technical Support and ask them to help you troubleshoot.  Let them do the legwork; they should be able to explain what's happening.

  3. Perform a full - bare metal if possible - backup of the machine before doing anything further!

  4. Perform a clean boot
    OPTIONAL: Run the commands below from an elevated command prompt but don't I personally don't expect any real reward here:
    • sfc /scannow
    • Dism /Online /Cleanup-Image /ScanHealth
    • Dism /Online /Cleanup-Image /CheckHealth
    • Dism /Online /Cleanup-Image /RestoreHealth
      Note: More work may be required for this command if it fails.

  5. Create a new user account or try running Spotify with a different.  This is key because if Spotify doesn't work with User A but does work with User B, then the system as whole is fine, but there's something unique to User A's user profile that's creating a problem.  This helps to narrow the scope of issue and also provides an easy fix.

  6. Run ProcMon while attempting to launch Spotify then review the non-success results for a possible hint.  Also worth checking the Application and System logs.

  7. Use an unrestricted & unfiltered network connection (so no firewalls, no security appliances like websense etc.)

  8. Temporarily pause/suspend/disable the application white listing solution

  9. Temporarily pause/suspend/disable the Anti-Virus/Anti-Malware solution

  10. Clear out GPO policies - Please note that this is potentially extremely dangerous as it requires editing the registry where one false move could break the system.  Backup (read: export) any registry keys before you modify (or delete) them so you have something to go back to

  11. Start removing applications one by one starting with ones that are least used and easiest to re-install.

 

So pluto1415, if you go down this path, please keep us up to date on your findings as I'm generally intellectually curious about things like this and others would like to truly understand what's happening here.

 

I bid you Good Providence!

If this post was helpful, please add kudos below!

spotify and other streaming software is rarely allowed on corporate
computers.. atleast where in work.

Hi henucu!

Yes, I agree that applications in this classification are typically not allowed becuase they fall outside of the 'approprite use of organizational resoruces' umbrella.  However, not every organization will have something in place to enforce that rule or to detect & block applications in that category.

It's not allowed here but we also don't have anything in place that prevents it either so ...

¯\_(ツ)_/¯

If this post was helpful, please add kudos below!

Thank you so much!!! Sooooo helpful!

Suggested posts