Spotify is among the foremost digital music apps for Windows 10 and 11. However, some users encounter issues when they try to install the Spotify desktop app, among which is error code 18. The error code 18 message says, “The installer is unable to install Spotify because the files to write to are in use by another process.”

This error typically occurs for users trying to reinstall Spotify. Users can’t install the Spotify desktop software because of it. If you’re another user who needs to resolve error code 18, you can fix that issue in Windows with these potential resolutions.

The error code 18 message drops a pretty big hint for fixing that issue when it mentions other processes using files. If you’ve previously installed Spotify, there could be some unremoved background services or related processes for that app still running when attempting to reinstall. So, try looking for and terminating Spotify-related processes before installing the software as follows:

  1. To quickly access Task Manager, press that tool’s Ctrl + Shift + Esc keyboard shortcut.
  2. Click Processes to view that tab.
  3. Look for processes with Spotify in their titles or ones that include the logo for the software.
  4. Right-click all Spotify-related processes and select their End task options.
    The End task option
  5. Then try installing Spotify after terminating processes.

2. Make Sure Steam is Closed

Some Spotify users have said closing Steam and its associated processes can resolve error code 18. If you’ve got Steam installed on your PC, make sure it’s not running when trying to install Spotify. Follow these steps to make sure Steam is entirely closed:

  1. If Steam is open on the taskbar, click its window to bring it up.
  2. Click the Steam menu.
  3. Select Exit to close the app.
    the-exit-option-in-steam
  4. Open Task Manager to view the Processes tab.
  5. Select any associated Steam process visible on that tab and click End task.
  6. Then have another go at installing Spotify with Steam closed.

3. Delete the Spotify Data Folder

Deleting leftover Spotify data is an error code 18 fix that’s worked for some users. Such a resolution is primarily applicable if you’ve previously installed Spotify. Then you might need to eradicate leftover data causing error 18 to occur. This is how you can delete the Spotify data folder:

  1. To access Run, press WIn + R.
  2. Type %AppData% inside Run’s Open box.
  3. Select OK to open the Roaming directory in File Explorer.
  4. Right-click the Spotify data folder and select its Delete option.
    The Delete context menu option
  5. Select Yes if prompted to confirm.
  6. Restart the PC after erasing that data folder.

4. Erase all Spotify Files in Explorer

Error code 18 can also be caused by leftover Spotify files on your PC outside the data folder. Some users have resolved that issue by manually clean-sweeping all Spotify files they can find within File Explorer. Eradicate Spotify files as follows:

  1. Press Win + E to view File Explorer.
  2. Select This PC in File Explorer’s left sidebar.
  3. Then click inside Explorer’s search box (or press Ctrl + F).
  4. Input Spotify in the search box and press Enter.
    The Spotify file search
  5. Select all Spotify files found by holding the Ctrl key.
  6. Right-click the selected Spotify files to select Explorer’s Delete context menu option.
  7. Click Start to select the Power and Restart options.

5. Uninstall Comodo Firewall and iTunes

Comodo Firewall and iTunes are two software packages users have found interfere with Spotify’s installation and cause error 18. Do you have either software installed on your PC? If so, uninstall Comodo Firewall or iTunes before attempting to install Spotify again. You can remove those desktop apps within the Control Panel, as covered in our guide to uninstalling software in Windows 11.

The Programs and Feature applet

Restart your PC when you’ve uninstalled Comodo Firewall or iTunes. Then try installing Spotify again. You can reinstall Comodo Firewall or iTunes afterward irrespective of whether this resolution works.

6. Perform a Clean Boot in Windows 11/10

Error code 18 often occurs because something in the background (a service or app process) is conflicting with Spotify’s installation. Clean-booting Windows 11/10 will eliminate third-party background services and apps that automatically start. Then you might be able to install Spotify without issues.

To perform a clean boot, you’ll need to remove third-party apps and services from the Windows startup. Our guide about performing a clean boot includes instructions for how you can eliminate startup apps and services with Task Manager and MSConfig. When you’ve configured the clean boot, restart Windows and try installing Spotify.

The Services tab in MSConfig

There’s no need to identify any conflicting app or service if this potential error code 18 solution works since this is an installation issue. You can fully restore the original Windows 11/10 boot configuration after installing Spotify.

7. Install Spotify in Safe Mode

The Windows safe mode is a special troubleshooting mode that starts the OS with only essential files, services, and drivers. Going into safe mode is similar to clean-booting Windows but also slightly different since it restricts drivers. That mode can feasibly fix error code 18 when caused by a conflicting third-party app or service.

To activate that mode, check out our guide for booting into Windows Safe mode. Select the Enable Safe Mode with Networking option; then try installing Spotify in the safe mode to see if that makes a difference.

8. Install the Spotify UWP App

There are alternative Spotify desktop and UWP (Universal Windows Platform) app versions. Error 18 specifically applies to the desktop software users try to install with its setup file. The Spotify UWP app is available on Microsoft Store and doesn’t have a setup file. Install the Spotify UWP app instead if none of the above solutions work for you.

Installing Spotify from the Microsoft Store could be considered more of a workaround than an error 18 fix. However, there’s little difference between the UWP and desktop app versions. You can install the Spotify UWP app like this:

  1. Open the Spotify Microsoft Store page in your browser.
  2. Click Spotify’s Get in Store app option.
  3. Press the Open in Microsoft Store button to bring up that app.
    The Get Spotify option
  4. Click Get to install Spotify.

Listen to Music and Podcasts in the Spotify App Again

Those potential resolutions will very likely resolve error code 18 because they’ve fixed that installation issue for many Spotify users. Resolution eight is almost a surefire workaround, but users who prefer to utilize the Spotify desktop software can probably get it installed by applying the other solutions. With error 18 fixed, you can listen to music and podcasts with the Spotify app to your heart’s content.