Fix: Error Code 18 on Spotify

Spotify is one of the best music streaming platforms out there, Spotify has a dedicated desktop application to make it easier for users to stream music on their computers. Unfortunately, many Windows users have reported seeing error code 18 while trying to install the Spotify application on their computers. Error code 18 is always accompanied by a message that reads:

“The installer is unable to install Spotify because the files to write are in use by another process.  Please make sure Spotify is not running and retry.”

Error code 18 occurs because files that are supposed to be copied over to your computer and written during the installation of Spotify are, for some reason, already on it and are also in use by another process or application while the Spotify installer is trying to do its job. This is the reason why most of the users affected by this problem see error code 18 while trying to reinstall Spotify after having previously uninstalled it from their computers. Sometimes when you uninstall an application from your computer, some files, settings or registry elements pertaining to the application you uninstall are left behind. If these remnants are later used by another process or application while you try to reinstall the application you uninstalled, the reinstallation might fail.

Thankfully, though, getting error code 18 while trying to install Spotify is not the end of the world. The following are some of the most effective solutions you can use to get rid of error code 18 and successfully install Spotify:

Solution 1: End any Spotify processes still running in the background

  1. Press Ctrl + Shift + Esc to launch the Task Manager.
  2. Navigate to the Processes tab.
  3. Scroll through the list of processes currently running on your computer and look for any processes with “Spotify” in their name.
  4. If you do not find any such processes, this solution isn’t for you and you should move on to another one. If you do find any such processes, one by one, right-click on each one and click on End Process.
  5. Click on End process in the resulting dialog to confirm the action.
  6. Run the Spotify installer and see if you are now able to successfully install Spotify on your computer.

Solution 2: Delete the Spotify folder in your computer’s AppData directory

  1. Press the Windows Logo key + R to open a Run dialog.
  2. Type %appdata% into the Run dialog and press Enter to open the AppData directory in a fresh instance of Windows Explorer.
  3. Locate the Spotify folder in the AppData directory, right-click on it and click on Delete.
  4. In the resulting popup, click on Yes to confirm the action and delete the Spotify folder.
  5. Restart your computer.
  6. When your computer boots up, try installing Spotify to see whether or not you’re still getting error code 18.

Solution 3: Delete every file pertaining to Spotify on your computer

  1. Press the Windows Logo key + E to launch the Windows Explorer.
  2. Press Ctrl + F to activate the Search bar directly from your keyboard.
  3. Type “spotify” into the Search bar and press Enter.
  4. Wait for Windows Explorer to search the entirety of your computer for files with “spotify” in their name and display the results to you.
  5. Once you have the results, press Ctrl + A to select ALL of the files.
  6. Press Delete.
  7. Click on Yes in the resulting popup to confirm the action and delete all of the files.
  8. Restart your computer.

Once done, try installing Spotify and see if it works now.

Solution 4: Exit Steam and then try to install Spotify

For some reason, Steam – the computer gaming platform – has a habit of using some of the files and processes that are left behind when you uninstall Spotify from your computer, and this can lead to you getting error code 18 when you try to reinstall Spotify. Thankfully, though, if this is the cause of this problem in your case, all you need to do is exit Steam and you should be able to successfully install Spotify.

  1. Open Steam.
  2. Click on Steam in the top-left side of the window.
  3. Click on Exit.
  4. Wait for Steam to close completely.
  5. Wait another minute or so just to be safe.
  6. Run the Spotify installer and try to install Spotify on your computer – if Steam really was the culprit behind the problem, Spotify should be installed without fail.

Solution 5: Uninstall any programs interfering with the Spotify installation

Some programs are known to interfere with the Spotify installer and lead to users seeing errors such as error code 18 when they try to install Spotify. Two programs that are particularly known to cause this problem are iTunes and Comodo. If you have any of these two programs on your computer or another program that you think may be interfering with the installation of Spotify on your computer, here’s what you should do:

  1. Open the Start Menu.
  2. Search for “add or remove programs“.
  3. Click on the search result titled Add or remove programs.
  4. Scroll down the list of programs installed on your computer, locate iTunes, Comodo or whatever other program you think might be hindering the installation of Spotify and right-click on it.
  5. Click on Uninstall.
  6. Go through the wizard to uninstall the program.
  7. Once the program has been uninstalled, restart your computer.
  8. When your computer boots up, run the Spotify installer. The Spotify installation should now go through successfully.
  9. If Spotify is successfully installed on your computer, you can go ahead and reinstall the program you previously uninstalled to get the Spotify installation to succeed.

Some Spotify users have also reported error code 18 popping up while they try to launch Spotify. If you’re getting error code 18 while trying to launch Spotify, simply uninstall Spotify from your computer and then use the following solutions to try and resolve the issue:

Solution 1: Boot your computer in to and out of Safe Mode

Sometimes, all it takes to get rid of error code 18 on a Windows computer is to boot the computer in to Safe Boot and then out of it. In order apply this solution, you need to:

  1. Press the Windows Logo key + R to open a Run dialog.
  2. Type msconfig into the Run dialog and press Enter.
  3. Navigate to the Boot tab of System Configuration.
  4. Under the Boot options section, check the Safe boot option.
  5. Click on Apply.
  6. Click on OK.
  7. Restart your computer. When your computer boots up, it will boot into Safe Mode.
  8. When your computer boots up, repeat steps 16, but this time uncheck the Safe boot option in step 4 instead of checking it.
  9. Restart your computer, and this time it will boot out of Safe Mode and boot up how it normally does.

When your computer boots up, run the Spotify installer, install Spotify and check to see whether or not the problem still persists.

Solution 2: Boot your computer up with all services disabled, and then enabled

  1. Press the Windows Logo key + R to open a Run dialog.
  2. Type msconfig into the Run dialog and press Enter.
  3. Navigate to the Services tab of System Configuration.
  4. Click on Disable all.
  5. Click on Apply.
  6. Click on OK.
  7. Restart your computer. When your computer boots up, it will act a bit weird and you will not be connected to the internet – but that’s totally fine.
  8. Repeat steps 16, but this time click on Enable all in step 4 instead of clicking on Disable all.
  9. Restart your computer, and this time it will boot up with all of its services enabled, like it normally does.

When your computer boots up, run the Spotify installer, install Spotify and check to see if error code 18 still pops up.

ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.