Last active
September 15, 2019 10:58
-
-
Save timmyRS/c089f02aaeb671d9ebb07202cc5fba46 to your computer and use it in GitHub Desktop.
A batch script to add your folder to %PATH% avoiding the 1024 character limit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /F /V PATH /T REG_SZ /D "YOUR_PATH_FOLDER;%PATH%" | |
:: Setting a temporary dummy variable so setx will broadcast WM_SETTINGCHANGE so the PATH change is reflected without needing a restart. | |
SETX /m DUMMY "" | |
REG DELETE "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /F /V DUMMY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment