This PowerShell script automates the entire process of installing and updating BetterDiscord. It takes care of everything: from ensuring required dependencies are installed to updating the BetterDiscord repository and injecting it into Discord. Sit back, relax, and let the script do the heavy lifting!
- Automatically closes Discord if it's running.
- Checks for and installs Git, Node.js, and pnpm if they are missing.
- Clones the BetterDiscord repository if it's not already present.
- Updates the BetterDiscord repository to the latest version.
- Installs all dependencies and builds the project.
- Injects BetterDiscord into the Discord client.
- Restarts Discord with BetterDiscord fully injected.
Before running the script, ensure the following are installed on your system (the script will handle missing dependencies for you):
- Git
- Node.js
- pnpm
Important
Download the BetterDiscordUpdate.ps1
script from the GitHub repository.
Caution
Make sure you place the script in an easily accessible directory. This ensures you can find and execute it later without hassle.
- For easy access, place the script in:
%USERPROFILE%\AppData\Roaming\BetterDiscord Update Script
- This will make it simple to find and execute the script later.
Important
Creating a shortcut to the script makes running it more convenient and accessible directly from the Start Menu.
Steps:
- Right-click on your desktop and select New > Shortcut.
- In the location field, paste the following command:
powershell.exe -ExecutionPolicy Bypass -File "%USERPROFILE%\AppData\Roaming\BetterDiscord Update Script\BetterDiscordUpdate.ps1"
- Name the shortcut (e.g., "BetterDiscord Update").
- Click Finish to create the shortcut.
- Optionally, move the shortcut to your Start Menu folder:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs
Now you can launch the script directly from your Start Menu! 🎉
Important
If you created a shortcut, you can simply click on it to run the script.
Caution
If you didn't create a shortcut, be sure to run the script with Administrator privileges to avoid permission issues.
- With Shortcut: Simply click the shortcut you created to run the script.
- Without Shortcut:
- Open PowerShell as Administrator.
- Navigate to the folder where the script is saved.
- Run the script:
.\BetterDiscordUpdate.ps1
- Or right-click the script and select Run with PowerShell.
Important
The script takes care of everything. Once you run it, you don't need to worry about anything else. Here's what happens:
- Closes Discord if it's running to ensure a clean update.
- Installs Git, Node.js, and pnpm if they're missing.
- Clones the BetterDiscord repository if it doesn’t exist.
- Updates the BetterDiscord repository to the latest version.
- Installs dependencies using pnpm and builds the project.
- Injects BetterDiscord into Discord.
- Restarts Discord with BetterDiscord injected!
Caution
Re-running the script will update BetterDiscord to the latest version, so make sure to use it whenever you want to stay up to date.
If you need to update BetterDiscord in the future, just rerun the script. It will handle everything automatically! 🎉
Caution
If the script doesn't work as expected, follow these steps to resolve common issues:
- Dependencies Not Installing:
Ensure your internet connection is stable and no firewall is blocking downloads. - Discord Not Launching:
If Discord doesn't restart automatically, manually open Discord from your desktop or Start Menu. - Permission Issues:
If you're facing permission issues, ensure you're running PowerShell as Administrator.
This project is licensed under the MIT License. Feel free to use and modify it as you wish!