From 0d5cb08983c34d5bedbff786867f21592351cd8e Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 12 Mar 2024 00:54:08 +0100 Subject: [PATCH 1/3] fix blockthespot #16 --- windows/blockthespot.bat | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/windows/blockthespot.bat b/windows/blockthespot.bat index 5b8562c..d929cc3 100644 --- a/windows/blockthespot.bat +++ b/windows/blockthespot.bat @@ -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 From f892e19c3ca747bcf44aad75ea7518e39710b4b3 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 12 Mar 2024 09:19:38 +0100 Subject: [PATCH 2/3] include subdirectories --- windows/ctmpf.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/ctmpf.bat b/windows/ctmpf.bat index eb45789..48be82b 100644 --- a/windows/ctmpf.bat +++ b/windows/ctmpf.bat @@ -12,7 +12,7 @@ ECHO CTMPF :: Clean TeMPorary Files :: Empty the user's temp folder ECHO Suppression des fichiers dans %TEMP%... -DEL /F /Q %LOCALAPPDATA%\Temp\* 2>NUL +DEL /S /F /Q %LOCALAPPDATA%\Temp\* 2>NUL RMDIR /S /Q "%TEMP%" 2>NUL :: Empty the system's temp folder From 4bfed6a231f873631f4f6716a9a0586a53c33b79 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 12 Mar 2024 09:19:46 +0100 Subject: [PATCH 3/3] clean nvidia shader caches --- windows/ctmpf.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/windows/ctmpf.bat b/windows/ctmpf.bat index 48be82b..2b4decd 100644 --- a/windows/ctmpf.bat +++ b/windows/ctmpf.bat @@ -49,6 +49,11 @@ RMDIR /S /Q "C:\PerfLogs" 2>NUL ECHO Suppression des logs de la pile C:\DumpStack.log... DEL /Q "C:\DumpStack.log" 2>NUL +:: Empty NVidia shader caches +ECHO Supprime les caches NVidia +DEL /S /F /Q %LOCALAPPDATA%Low\NVIDIA\PerDriverVersion\DXCache\* 2>NUL +DEL /S /F /Q %LOCALAPPDATA%\NVIDIA\GLCache\* 2>NUL + :: Clean disks ECHO Nettoyage de l'ordinateur avec cleanmgr... CD %WINDIR%\system32