Skip to content

Instantly share code, notes, and snippets.

@Knewest
Last active October 29, 2024 22:29
Show Gist options
  • Save Knewest/ee59d3960e18e6d813c9221b54b36ab1 to your computer and use it in GitHub Desktop.
Save Knewest/ee59d3960e18e6d813c9221b54b36ab1 to your computer and use it in GitHub Desktop.
Reinstall BetterDiscord seconds after Discord uninstalls it against your will. Avoid using the time consuming installer with this trick.

How to make BetterDiscord easier to install repeatedly:

  1. Download and install these two CLI tools:

  2. Create a permanent folder on your file explorer named something like BetterDiscordReinstall.

  3. Depending on your Discord client, place the two batch programs in the folder:

    Stable Discord:

    Discord Public Test Build:

    Discord Canary:

  1. For the initial setup, run the FullyReinstallBetterDiscord.bat batch program and a BetterDiscord folder will be created within the folder.
  1. If BetterDiscord ever uninstalls itself, run the QuickReinstallBetterDiscord.bat batch program and it will bring BetterDiscord back within a literal second.

  2. Ideally, right click the folder you created and pin it to the quick access bar so you can quicky reinstall BetterDiscord if it is uninstalled by Discord:

    https://cdn.discordapp.com/attachments/1071870103513210990/1104006791651672114/IeTG4OyRpc.webp


    Note:
    If QuickReinstallBetterDiscord.bat ever stops working, just rerun the FullyReinstallBetterDiscord.bat batch program to hopefully fix it. If this doesn't work either, Discord may have broken BetterDiscord and you will need to wait for BetterDiscord to release a patch/update addressing it.



Thank you for using my guide, I hope it helps greatly. Now you no longer have use the installer over and over again, which is time consuming.
- Knew
set START_MENU_PATH=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Discord Inc\Discord Canary.lnk
taskkill /F /IM DiscordCanary.exe
if exist "%START_MENU_PATH%" (
git clone https://github.com/BetterDiscord/BetterDiscord.git
cd betterdiscord
npm install -g pnpm
pnpm install
pnpm build
pnpm inject canary
start "" "%START_MENU_PATH%"
)
set START_MENU_PATH=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Discord Inc\Discord Canary.lnk
taskkill /F /IM DiscordCanary.exe
if exist "%START_MENU_PATH%" (
cd betterdiscord
pnpm inject canary
start "" "%START_MENU_PATH%"
)
set START_MENU_PATH=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Discord Inc\Discord PTB.lnk
taskkill /F /IM DiscordPTB.exe
if exist "%START_MENU_PATH%" (
git clone https://github.com/BetterDiscord/BetterDiscord.git
cd betterdiscord
npm install -g pnpm
pnpm install
pnpm build
pnpm inject ptb
start "" "%START_MENU_PATH%"
)
set START_MENU_PATH=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Discord Inc\Discord PTB.lnk
taskkill /F /IM DiscordPTB.exe
if exist "%START_MENU_PATH%" (
cd betterdiscord
pnpm inject ptb
start "" "%START_MENU_PATH%"
)
set START_MENU_PATH=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Discord Inc\Discord.lnk
taskkill /F /IM Discord.exe
if exist "%START_MENU_PATH%" (
git clone https://github.com/BetterDiscord/BetterDiscord.git
cd betterdiscord
npm install -g pnpm
pnpm install
pnpm build
pnpm inject
start "" "%START_MENU_PATH%"
)
set START_MENU_PATH=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Discord Inc\Discord.lnk
taskkill /F /IM Discord.exe
if exist "%START_MENU_PATH%" (
cd betterdiscord
pnpm inject
start "" "%START_MENU_PATH%"
)
@bitingsock
Copy link

I suggest cd %~dp0betterdiscord in case the script is ran from another CWD

@xcloudx01
Copy link

Works great! Thank you so much

@renatamer
Copy link

The fact that we still need this is insane. Thanks for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment