From b88d74ea96b954e7f53bb689b2a16f0d34b37caf Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 13 Sep 2023 12:03:52 +0200 Subject: [PATCH] reduce line size Using "" ^ for Powershell commands --- windows/blockthespot.bat | 27 ++++++++++++++------------- windows/fix_obs_shortcut.bat | 13 +++++++------ windows/vencord_installer.bat | 13 +++++++------ 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/windows/blockthespot.bat b/windows/blockthespot.bat index bbb0b92..e628778 100644 --- a/windows/blockthespot.bat +++ b/windows/blockthespot.bat @@ -9,19 +9,20 @@ PowerShell -Command "Stop-Process -Name Spotify -ErrorAction SilentlyContinue" :: Patch spotify ECHO Patch spotify avec BlockTheSpot -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" +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" :: Delete newly created Spotify shortcut DEL %HOMEPATH%\Desktop\Spotify.lnk 2>NUL diff --git a/windows/fix_obs_shortcut.bat b/windows/fix_obs_shortcut.bat index a509511..07a745a 100644 --- a/windows/fix_obs_shortcut.bat +++ b/windows/fix_obs_shortcut.bat @@ -8,12 +8,13 @@ fltmc >NUL 2>&1 || ( EXIT 0 ) -PowerShell -Command "$WshShell = New-Object -COM WScript.Shell;" ^ - "$Shortcut = $WshShell.CreateShortcut('%ProgramData%\Microsoft\Windows\Start Menu\Programs\OBS Studio\OBS Studio (64bit).lnk');" ^ - "$Shortcut.TargetPath = '%ProgramFiles%\obs-studio\bin\64bit\obs64.exe';" ^ - "$Shortcut.WorkingDirectory = '%ProgramFiles%\obs-studio\bin\64bit';" ^ - "$Shortcut.Arguments = '--profile ""ANRI GAMING (PROFIL)"""" --multi';" ^ - "$Shortcut.Save()" +PowerShell -Command "" ^ + "$WshShell = New-Object -COM WScript.Shell;" ^ + "$Shortcut = $WshShell.CreateShortcut('%ProgramData%\Microsoft\Windows\Start Menu\Programs\OBS Studio\OBS Studio (64bit).lnk');" ^ + "$Shortcut.TargetPath = '%ProgramFiles%\obs-studio\bin\64bit\obs64.exe';" ^ + "$Shortcut.WorkingDirectory = '%ProgramFiles%\obs-studio\bin\64bit';" ^ + "$Shortcut.Arguments = '--profile ""ANRI GAMING (PROFIL)"""" --multi';" ^ + "$Shortcut.Save()" IF NOT "%1"=="yes" PAUSE EXIT /B diff --git a/windows/vencord_installer.bat b/windows/vencord_installer.bat index cb30bee..c7e6f3c 100644 --- a/windows/vencord_installer.bat +++ b/windows/vencord_installer.bat @@ -4,12 +4,13 @@ ECHO Ferme Discord TASKKILL /im Discord.exe /F ECHO Installe Vencord -PowerShell -Command "$link = 'https://github.com/Vencord/Installer/releases/latest/download/VencordInstallerCli.exe';" ^ - "$file = 'vencord.exe';" ^ - "$outfile = Join-Path -Path $env:TEMP -ChildPath $file;" ^ - "Invoke-WebRequest -Uri $link -OutFile $outfile;" ^ - "cd $env:TEMP;" ^ - "ECHO 1| & $outfile -install" +PowerShell -Command "" ^ + "$link = 'https://github.com/Vencord/Installer/releases/latest/download/VencordInstallerCli.exe';" ^ + "$file = 'vencord.exe';" ^ + "$outfile = Join-Path -Path $env:TEMP -ChildPath $file;" ^ + "Invoke-WebRequest -Uri $link -OutFile $outfile;" ^ + "cd $env:TEMP;" ^ + "ECHO 1| & $outfile -install" IF NOT "%1"=="yes" ( :: Restart Discord