30 lines
783 B
Batchfile
30 lines
783 B
Batchfile
@ECHO OFF
|
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
|
|
|
ECHO Close Discord
|
|
TASKKILL /im Discord.exe /F
|
|
|
|
ECHO Update Discord
|
|
ECHO Y | winget install -he Discord.Discord
|
|
|
|
SET "discord_dir=%LOCALAPPDATA%\Discord"
|
|
|
|
ECHO Reclose Discord
|
|
TASKKILL /im Discord.exe /F
|
|
|
|
ECHO Install 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;" ^
|
|
"Start-Process -Wait -NoNewWindow $outfile '-install', '-location !discord_dir!';" ^
|
|
"Remove-Item -Force $outfile"
|
|
|
|
IF NOT "%1"=="yes" (
|
|
:: Restart Discord
|
|
PowerShell Start-Process "!discord_dir!\app-*\Discord.exe"
|
|
|
|
PAUSE
|
|
)
|
|
EXIT /B
|