Updating path in windows
If you enter the password, “Advanced system settings” will successfully open, but any user-specific changes you make there will apply to the corresponding administrator's account (! If your user has administrator rights, you will be able to edit both sections of that dialog: user-specific environment variables (upper section) and system-wide environment variables (lower section).If you don't have administrator rights, you will only be able to edit the upper section: your own user-specific environment variables.Cannot find HKEY_CURRENT_USER\Environment: PATH due to: [Win Error 2] The system cannot find the file specified PATH C:\foo !!!Cannot access HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Control\Session Manager\Environment: PATH due to: [Win Error 5] Access is denied ---Set HKEY_CURRENT_USER\Environment: PATH=C:\foo PATH D:\Bar !!!
If I close and open cmd, that new string is not in PATH.However, if you want to edit both system-wide and user-specific environment variables then most (if not all) of these answers are inapplicable in general case. On the left-hand side of that applet you will see a link that says Change my environment variables.Going through "System" and then “Advanced system settings” - user account, then trying to access “Advanced system settings” will trigger an UAC prompt asking you for administrator password. in order to give regular users the opportunity to edit their own environment variables) Windows provides another way to access the “Environment Variables” dialog. Click that link, and it will take you to the same “Environment Variables” dialog for your user's environment variables.You indicate in the comments that you would be happy to modify just the per-user environment.Do this by editing the values in HKEY_CURRENT_USER\Environment. Note that the current command-window will not be affected, changes would apply only for new command-windows.