Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mrpond/BlockTheSpot
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpond committed Mar 31, 2020
2 parents 4a50098 + 288bc06 commit 98813b6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions BlockTheSpot.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,17 @@ if %errorlevel% EQU 0 (
for /f delims^=^"^ tokens^=2 %%A in ('reg query HKCR\spotify\shell\open\command') do (
if exist "%%~dpA\Spotify.exe" set p=%%~dpA
)

echo Downloading latest patch (chrome_elf.zip)
echo.
powershell.exe -ExecutionPolicy Bypass -Command (new-object System.Net.WebClient).DownloadFile('https://github.com/mrpond/BlockTheSpot/releases/latest/download/chrome_elf.zip','%~p0chrome_elf.zip')
echo Patching Spotify..

if defined p (
echo Patching Spotify
powershell -command "Expand-Archive -Force '%~dp0chrome_elf.zip' '%~dp0'"
move "%APPDATA%\Spotify\chrome_elf.dll" "%APPDATA%\Spotify\chrome_elf.dll.bak" > NUL 2>&1
if not exist "%APPDATA%\Spotify\chrome_elf.dll.bak" (
move "%APPDATA%\Spotify\chrome_elf.dll" "%APPDATA%\Spotify\chrome_elf.dll.bak" > NUL 2>&1
)
copy chrome_elf.dll "%APPDATA%\Spotify\" > NUL 2>&1
copy config.ini "%APPDATA%\Spotify\" > NUL 2>&1
del /s /q "chrome_elf.dll" > NUL 2>&1
Expand All @@ -43,6 +50,5 @@ if defined p (
del /s /q "chrome_elf.dll" > NUL 2>&1
del /s /q "config.ini" > NUL 2>&1
echo Patching Completed
start "" "%appdata%\Spotify\Spotify.exe"
)
pause
pause

0 comments on commit 98813b6

Please sign in to comment.