From 2268ab0d8bb2aa6f6cf2728dc5b7f614a57d66fa Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 25 Aug 2024 14:08:35 +0200 Subject: [PATCH] better force close of discord --- windows/installers/vencord.bat | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/windows/installers/vencord.bat b/windows/installers/vencord.bat index 3490ace..296e44a 100644 --- a/windows/installers/vencord.bat +++ b/windows/installers/vencord.bat @@ -8,16 +8,20 @@ ECHO Update Discord ECHO Y | winget install -he Discord.Discord SET "discord_dir=%LOCALAPPDATA%\Discord" +SET "vencord=%TEMP%\vencord.exe" + +ECHO Download Vencord +PowerShell -Command "" ^ + "$link = 'https://github.com/Vencord/Installer/releases/latest/download/VencordInstallerCli.exe';" ^ + "$outfile = Join-Path -Path $env:TEMP -ChildPath '!vencord!';" ^ + "Invoke-WebRequest -Uri $link -OutFile $outfile" 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;" ^ + "$outfile = Join-Path -Path $env:TEMP -ChildPath '!vencord!';" ^ "Start-Process -Wait -NoNewWindow $outfile '-install', '-location !discord_dir!';" ^ "Remove-Item -Force $outfile"