Merge branch 'main' of git.mylloon.fr:Anri/confOS

This commit is contained in:
Mylloon 2024-03-13 08:46:54 +01:00
commit 9cc67e56d3
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 18 additions and 13 deletions

View file

@ -11,18 +11,18 @@ PowerShell -Command "Stop-Process -Name Spotify -ErrorAction SilentlyContinue"
ECHO Patch spotify avec BlockTheSpot ECHO Patch spotify avec BlockTheSpot
PowerShell -Command "" ^ PowerShell -Command "" ^
"cd $env:TEMP;" ^ "cd $env:TEMP;" ^
"$url_elf = 'https://github.com/mrpond/BlockTheSpot/releases/latest/download/chrome_elf.zip';" ^ "$urlElf = 'https://github.com/mrpond/BlockTheSpot/releases/latest/download/chrome_elf.zip';" ^
"$dest_elf = Join-Path -Path $PWD -ChildPath 'chrome_elf.zip';" ^ "$destElf = Join-Path -Path $PWD -ChildPath 'chrome_elf.zip';" ^
"$spotifyDirectory = Join-Path -Path $env:APPDATA -ChildPath 'Spotify';" ^ "$dir = Join-Path -Path $env:APPDATA -ChildPath 'Spotify';" ^
"$spotifyExecutable = Join-Path -Path $spotifyDirectory -ChildPath 'Spotify.exe';" ^ "$exe = Join-Path -Path $dir -ChildPath 'Spotify.exe';" ^
"Invoke-WebRequest -Uri $url_elf -OutFile $dest_elf;" ^ "Invoke-WebRequest -Uri $urlElf -OutFile $destElf;" ^
"Expand-Archive -Force -LiteralPath $dest_elf -DestinationPath $PWD | Wait-Process;" ^ "Expand-Archive -Force -LiteralPath $destElf -DestinationPath $PWD | Wait-Process;" ^
"Remove-Item -LiteralPath $dest_elf -Force;" ^ "Remove-Item -LiteralPath $destElf -Force;" ^
"$patchFiles = (Join-Path -Path $PWD -ChildPath 'dpapi.dll')," ^ "$patchedFiles = (Join-Path -Path $PWD -ChildPath 'dpapi.dll')," ^
"(Join-Path -Path $PWD -ChildPath 'config.ini');" ^ "(Join-Path -Path $PWD -ChildPath 'config.ini');" ^
"Copy-Item -LiteralPath $patchFiles -Destination $spotifyDirectory;" ^ "Copy-Item -LiteralPath $patchedFiles -Destination $dir;" ^
"Remove-Item -LiteralPath $patchFiles;" ^ "Remove-Item -LiteralPath $patchedFiles;" ^
"Start-Process -WorkingDirectory $spotifyDirectory -FilePath $spotifyExecutable" "Start-Process -WorkingDirectory $dir -FilePath $exe"
:: Delete newly created Spotify shortcut :: Delete newly created Spotify shortcut
DEL %HOMEPATH%\Desktop\Spotify.lnk 2>NUL DEL %HOMEPATH%\Desktop\Spotify.lnk 2>NUL
@ -33,7 +33,7 @@ IF NOT "%1"=="yes" (
:: Restart Spotify :: Restart Spotify
PowerShell -Command "" ^ PowerShell -Command "" ^
"$dir = Join-Path -Path $env:APPDATA -ChildPath 'Spotify';" ^ "$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" "Start-Process -WorkingDirectory $dir -FilePath $exe"
PAUSE PAUSE

View file

@ -12,7 +12,7 @@ ECHO CTMPF :: Clean TeMPorary Files
:: Empty the user's temp folder :: Empty the user's temp folder
ECHO Suppression des fichiers dans %TEMP%... 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 RMDIR /S /Q "%TEMP%" 2>NUL
:: Empty the system's temp folder :: Empty the system's temp folder
@ -49,6 +49,11 @@ RMDIR /S /Q "C:\PerfLogs" 2>NUL
ECHO Suppression des logs de la pile C:\DumpStack.log... ECHO Suppression des logs de la pile C:\DumpStack.log...
DEL /Q "C:\DumpStack.log" 2>NUL 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 :: Clean disks
ECHO Nettoyage de l'ordinateur avec cleanmgr... ECHO Nettoyage de l'ordinateur avec cleanmgr...
CD %WINDIR%\system32 CD %WINDIR%\system32