Fails to kill discord: powershell.exe not on PATH
mattjoe480 opened this issue · comments
BetterDiscord Installer stuck in loop
Installer stuck in a loop if Powershell is not set in the environment variable.
To Reproduce
Steps to reproduce the behavior:
- Remove Powershell from to environment variable.
- Run the installer till it reaches
Attempting to kill Discord
.
Expected behavior
Installer doesn't do anything after reaching Attempting to kill Discord
.
System Information:
- OS: Windows 11 Version 22H2
- Discord Version: Stable 183813 (7a19dec)
Suggestion
This is ultimately an issue with one of our dependencies, but we can definitely handle it more gracefully.
I managed to solve this issue by checking if Powershell is in the users path.
Check if the user has Powershell in their path in kill.js If not going to else before try statment.
else { log("Shell not found"); log("Please restart discord manually"); progress.set(progress.value + progressPerLoop); return null; }
And adding this check to install.js
if (killErr || killErr == null) showRestartNotice();
can confirm this was still an issue for me with installer 1.3.0.
When i added "C:\Windows\System32\WindowsPowerShell\v1.0" to my PATH it started to work like advertised. but it took me a LONG long time to find this about it's being due to missing powershell PATH.
Also allegedly even if system32 is in PATH windows have issues finding stuff in it's own subfolders which i found here under cause: https://confluence.atlassian.com/bamkb/powershell-is-not-recognized-as-an-internal-or-external-command-1095246216.html
EDIT: This is on a Windows 10 Build 19045 if that's important
I also just had this problem and adding the path variable fixed it for me, would be nice if there could be some error displayed.