I would like to create a script to add a path
to the Windows System Path
variable.
I searched a lot and found some possible solutions, but I'm afraid of making a mistake since I've heard reports that some commands can corrupt the local Path
variable and then prevent the computer from booting again.
I would like to include via .bat
the path C:\Scripts
in the variable Path
of the system
.
What is the best way to do this?
setx path "%path%;C:\Scripts" /m
or thisREG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Control\Session Manager\Environment /v Path /t REG_SZ /d C:\Scripts /f