Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rem Spotify update for those who cannot run from the appdata directories.
- rem This process downloads the initial installer, runs it, moves the "Full" installer it installs to a place
- rem from which we from which we can run it, then copies the Spotify program and other files that THAT installs
- rem to the directory from which we desire to run it. It deletes the installers it downloads as it goes.
- rem
- rem Do not delete the Spotify installation from the Appdata directory, as Spotify appears to need it to run properly.
- rem
- rem Hit "Cancel" to the "Error 53" that the installer encounters, and then "OK" to the "Spotify could not be started" message. These
- rem errors are expected, and indeed are why this process is necessary in the first place.
- rem rem out the "echo off" below if you are debugging this batch file
- echo off
- set localspotifyrundir=c:\users\myusername\spotify
- set tempdir=%TEMP%
- del %tempdir%\spot*.exe
- bitsadmin /transfer spotdownload /download /priority high https://download.scdn.co/SpotifySetup.exe %tempdir%\SpotifySetup.exe
- echo ****** WHEN "(Error code: 53)" COMES UP, HIT CANCEL ******
- %tempdir%\spotifysetup.exe
- timeout /t 1
- del %tempdir%\spotifysetup.exe
- rem Copy the spotify setup program to a directory from which it can be run
- for /f "usebackq" %%i in (`dir /s /b c:\users\%username%\appdata\local\microsoft\windows\inetcache\ie\Spoti*.exe`) do (copy %%i %tempdir%)
- rem and run it
- echo ****** WHEN THE "Spotify could not be started" MESSAGE COMES UP, HIT OK ******
- for /f "usebackq" %%i in (`dir /b %tempdir%\Spoti*.exe`) do (%tempdir%\%%i)
- timeout /t 1
- del %tempdir%\spot*.exe
- rem Now copy the installed spotify into the directory from which we wish to run it.
- xcopy c:\users\%username%\appdata\roaming\spotify\* %localspotifyrundir% /s /y /q
- rem (2021-06-11) and delete the spotify installer, if present. If this step does not work for you, find where spotify is storing the program
- rem spotify_installer-(version and other junk).exe and modify this batch file to delete it
- del c:\users\%username%\Appdata\Local\Spotify\Update\spotify*.exe
- echo You should now be able to run Spotify from %localspotifyrundir%.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement