Skip to content

Instantly share code, notes, and snippets.

@flier268
Created February 11, 2022 02:29
Show Gist options
  • Save flier268/1b68e17613dc8d8892ae07c699c3bbfa to your computer and use it in GitHub Desktop.
Save flier268/1b68e17613dc8d8892ae07c699c3bbfa to your computer and use it in GitHub Desktop.
Spotify中文版黑畫面修復
@echo off
setlocal enabledelayedexpansion
::variable
set fileName=prefs
set "appendLine=language="zh-TW""
cd /d %appdata%\..\Local\Packages\SpotifyAB.SpotifyMusic_zpdnekdrzrea0\LocalState\Spotify
Call :ReadEndOfFile "prefs"
::echo %lastLine%
::echo %appendLine%
::pause
if not "%lastLine%" == "%appendLine%" echo %appendLine% >> %fileName%
echo Try it!
pause > nul
endlocal
exit
:ReadEndOfFile %fileName%
FOR /F %%i IN (%~1) DO set "lastLine=%%i"
Goto :Eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment