fix blockthespot #16
This commit is contained in:
parent
4a91911124
commit
0d5cb08983
1 changed files with 12 additions and 12 deletions
|
@ -11,18 +11,18 @@ PowerShell -Command "Stop-Process -Name Spotify -ErrorAction SilentlyContinue"
|
|||
ECHO Patch spotify avec BlockTheSpot
|
||||
PowerShell -Command "" ^
|
||||
"cd $env:TEMP;" ^
|
||||
"$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')," ^
|
||||
"$urlElf = 'https://github.com/mrpond/BlockTheSpot/releases/latest/download/chrome_elf.zip';" ^
|
||||
"$destElf = Join-Path -Path $PWD -ChildPath 'chrome_elf.zip';" ^
|
||||
"$dir = Join-Path -Path $env:APPDATA -ChildPath 'Spotify';" ^
|
||||
"$exe = Join-Path -Path $dir -ChildPath 'Spotify.exe';" ^
|
||||
"Invoke-WebRequest -Uri $urlElf -OutFile $destElf;" ^
|
||||
"Expand-Archive -Force -LiteralPath $destElf -DestinationPath $PWD | Wait-Process;" ^
|
||||
"Remove-Item -LiteralPath $destElf -Force;" ^
|
||||
"$patchedFiles = (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"
|
||||
"Copy-Item -LiteralPath $patchedFiles -Destination $dir;" ^
|
||||
"Remove-Item -LiteralPath $patchedFiles;" ^
|
||||
"Start-Process -WorkingDirectory $dir -FilePath $exe"
|
||||
|
||||
:: Delete newly created Spotify shortcut
|
||||
DEL %HOMEPATH%\Desktop\Spotify.lnk 2>NUL
|
||||
|
@ -33,7 +33,7 @@ IF NOT "%1"=="yes" (
|
|||
:: Restart Spotify
|
||||
PowerShell -Command "" ^
|
||||
"$dir = Join-Path -Path $env:APPDATA -ChildPath 'Spotify';" ^
|
||||
"$exe = Join-Path -Path $spotifyDirectory -ChildPath 'Spotify.exe';" ^
|
||||
"$exe = Join-Path -Path $dir -ChildPath 'Spotify.exe';" ^
|
||||
"Start-Process -WorkingDirectory $dir -FilePath $exe"
|
||||
|
||||
PAUSE
|
||||
|
|
Loading…
Reference in a new issue