better force close of discord

This commit is contained in:
Mylloon 2024-08-25 14:08:35 +02:00
parent c43737c1b3
commit 2268ab0d8b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -8,16 +8,20 @@ ECHO Update Discord
ECHO Y | winget install -he Discord.Discord ECHO Y | winget install -he Discord.Discord
SET "discord_dir=%LOCALAPPDATA%\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 ECHO Reclose Discord
TASKKILL /im Discord.exe /F TASKKILL /im Discord.exe /F
ECHO Install Vencord ECHO Install Vencord
PowerShell -Command "" ^ PowerShell -Command "" ^
"$link = 'https://github.com/Vencord/Installer/releases/latest/download/VencordInstallerCli.exe';" ^ "$outfile = Join-Path -Path $env:TEMP -ChildPath '!vencord!';" ^
"$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!';" ^ "Start-Process -Wait -NoNewWindow $outfile '-install', '-location !discord_dir!';" ^
"Remove-Item -Force $outfile" "Remove-Item -Force $outfile"