use variable

This commit is contained in:
Mylloon 2024-01-23 14:47:24 +01:00
parent 5a9add3578
commit da8fabfc8e
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,4 +1,5 @@
@ECHO OFF @ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
ECHO Ferme Discord ECHO Ferme Discord
TASKKILL /im Discord.exe /F TASKKILL /im Discord.exe /F
@ -6,18 +7,20 @@ TASKKILL /im Discord.exe /F
ECHO MaJ Discord ECHO MaJ Discord
ECHO Y | winget install -he Discord.Discord ECHO Y | winget install -he Discord.Discord
SET "discord_dir=%LOCALAPPDATA%\Discord"
ECHO Installe Vencord ECHO Installe Vencord
PowerShell -Command "" ^ PowerShell -Command "" ^
"$link = 'https://github.com/Vencord/Installer/releases/latest/download/VencordInstallerCli.exe';" ^ "$link = 'https://github.com/Vencord/Installer/releases/latest/download/VencordInstallerCli.exe';" ^
"$file = 'vencord.exe';" ^ "$file = 'vencord.exe';" ^
"$outfile = Join-Path -Path $env:TEMP -ChildPath $file;" ^ "$outfile = Join-Path -Path $env:TEMP -ChildPath $file;" ^
"Invoke-WebRequest -Uri $link -OutFile $outfile;" ^ "Invoke-WebRequest -Uri $link -OutFile $outfile;" ^
"Start-Process -Wait -NoNewWindow $outfile '-install', '-location %LOCALAPPDATA%\Discord';" ^ "Start-Process -Wait -NoNewWindow $outfile '-install', '-location !discord_dir!';" ^
"Remove-Item -Force $outfile" "Remove-Item -Force $outfile"
IF NOT "%1"=="yes" ( IF NOT "%1"=="yes" (
:: Restart Discord :: Restart Discord
PowerShell Start-Process "%LOCALAPPDATA%\Discord\app-*\Discord.exe" PowerShell Start-Process "!discord_dir!\app-*\Discord.exe"
PAUSE PAUSE
) )