confOS/windows/installers/vencord.bat

38 lines
925 B
Batchfile
Raw Normal View History

2023-08-11 14:27:37 +02:00
@ECHO OFF
2024-01-23 14:47:24 +01:00
SETLOCAL ENABLEDELAYEDEXPANSION
2023-08-11 14:27:37 +02:00
2024-07-02 11:19:21 +02:00
ECHO Close Discord
2023-08-11 14:27:37 +02:00
TASKKILL /im Discord.exe /F
2024-08-30 08:57:44 +02:00
ECHO Force update Discord
2024-08-30 08:56:38 +02:00
ECHO Y | winget install --force -he Discord.Discord
2023-11-05 17:30:04 +01:00
2024-01-23 14:47:24 +01:00
SET "discord_dir=%LOCALAPPDATA%\Discord"
2024-08-25 14:08:35 +02:00
SET "vencord=%TEMP%\vencord.exe"
ECHO Download Vencord
PowerShell -Command "" ^
"$link = 'https://github.com/Vencord/Installer/releases/latest/download/VencordInstallerCli.exe';" ^
2024-08-25 14:09:58 +02:00
"Invoke-WebRequest -Uri $link -OutFile '!vencord!'"
2024-01-23 14:47:24 +01:00
2024-07-02 11:19:21 +02:00
ECHO Reclose Discord
2024-06-18 20:02:49 +02:00
TASKKILL /im Discord.exe /F
2024-07-02 11:19:21 +02:00
ECHO Install Vencord
PowerShell -Command "" ^
2024-08-25 14:09:58 +02:00
"Start-Process -Wait -NoNewWindow '!vencord!' '-install', '-location !discord_dir!';" ^
"Remove-Item -Force '!vencord!'"
2023-08-11 14:27:37 +02:00
2024-09-06 09:52:59 +02:00
:: Delete newly created Discord shortcut
DEL %HOMEPATH%\Desktop\Discord.lnk 2>NUL
ie4uinit -show
ECHO Remove the desktop shortcut
2023-08-11 14:28:22 +02:00
IF NOT "%1"=="yes" (
2023-08-11 14:27:37 +02:00
:: Restart Discord
2024-01-23 14:47:24 +01:00
PowerShell Start-Process "!discord_dir!\app-*\Discord.exe"
2023-08-11 14:27:37 +02:00
PAUSE
)
EXIT /B