2023-04-05 12:36:58 +02:00
|
|
|
@ECHO OFF
|
2023-04-04 08:58:13 +02:00
|
|
|
|
2023-04-26 21:32:35 +02:00
|
|
|
:: Install latest version of spotify
|
|
|
|
ECHO Installe la derniere version de spotify
|
2023-04-26 21:51:15 +02:00
|
|
|
ECHO Y | winget install -he Spotify.Spotify
|
2023-04-26 21:32:35 +02:00
|
|
|
|
|
|
|
:: Close spotify
|
|
|
|
PowerShell -Command "Stop-Process -Name Spotify -ErrorAction SilentlyContinue"
|
|
|
|
|
2023-04-04 08:58:13 +02:00
|
|
|
:: Patch spotify
|
2023-04-26 21:32:35 +02:00
|
|
|
ECHO Patch spotify avec BlockTheSpot
|
2023-09-13 12:03:52 +02:00
|
|
|
PowerShell -Command "" ^
|
|
|
|
"cd $HOME;" ^
|
|
|
|
"$url_elf = 'https://github.com/mrpond/BlockTheSpot/releases/latest/download/chrome_elf.zip';" ^
|
|
|
|
"$dest_elf = Join-Path -Path $PWD -ChildPath 'chrome_elf.zip';" ^
|
|
|
|
"$spotifyDirectory = Join-Path -Path $env:APPDATA -ChildPath 'Spotify';" ^
|
|
|
|
"$spotifyExecutable = Join-Path -Path $spotifyDirectory -ChildPath 'Spotify.exe';" ^
|
|
|
|
"Invoke-WebRequest -Uri $url_elf -OutFile $dest_elf;" ^
|
|
|
|
"Expand-Archive -Force -LiteralPath $dest_elf -DestinationPath $PWD | Wait-Process;" ^
|
|
|
|
"Remove-Item -LiteralPath $dest_elf -Force;" ^
|
|
|
|
"$patchFiles = (Join-Path -Path $PWD -ChildPath 'dpapi.dll')," ^
|
|
|
|
"(Join-Path -Path $PWD -ChildPath 'config.ini');" ^
|
|
|
|
"Copy-Item -LiteralPath $patchFiles -Destination $spotifyDirectory;" ^
|
|
|
|
"Remove-Item -LiteralPath $patchFiles;" ^
|
|
|
|
"Start-Process -WorkingDirectory $spotifyDirectory -FilePath $spotifyExecutable"
|
2023-04-04 08:58:13 +02:00
|
|
|
|
|
|
|
:: Delete newly created Spotify shortcut
|
2023-04-26 21:32:35 +02:00
|
|
|
DEL %HOMEPATH%\Desktop\Spotify.lnk 2>NUL
|
2023-04-04 08:58:13 +02:00
|
|
|
ie4uinit -show
|
2023-04-26 21:32:35 +02:00
|
|
|
ECHO Suppression du raccourci du bureau
|
2023-04-04 08:58:13 +02:00
|
|
|
|
2023-08-11 14:28:22 +02:00
|
|
|
IF NOT "%1"=="yes" PAUSE
|
2023-04-05 12:42:54 +02:00
|
|
|
EXIT /B
|