There are three ways.
1) Launches a graphical editor for user environment variables. It does exactly what the OP wanted to do, and does not ask for administrator credentials.
rundll32.exe sysdm.cpl,EditEnvironmentVariables
(bonus: this works from Windows Vista to Windows 10 for desktop computers and from Windows Server 2008 to Server 2016. This does not work on Windows NT, 2000, XP, and 2003. However, on older systems you can use sysdm.cpl without "EditEnvironmentVariables" , then go to the "Advanced" tab and click the "Environment Variables" button.)
2) Use the SETX command from the command line. This is similar to the set command, but it updates the environment that is stored in the registry. Unfortunately, SETX is not as easy to use as the built-in SET command. There is no way to list variables, for example. Thus, it is impossible to do something, for example, add a folder to a user PATH variable. While SET will display variables, you do not know which of them are user or system variables, and the displayed PATH is a combination of both.
3) Use regedit and go to HKEY_CURRENT_USER \ Environment
Remember that changes in the user environment do not immediately apply to all processes that are currently running for this user. You can see this on the command line, where your changes will not be visible if you use SET. for example
rem Add a user environment variable named stackoverflow that set to "test" setx stackoverflow test set st
This should show all variables whose names begin with the letters "st". If not, " Environment variable st not defined " is displayed. Exit the command prompt and run another. Try to set st times and you will see
stackoverflow=test
To remove the stackoverflow variable, use
setx stackoverflow ""
It will reply “ SUCCESS: Specified value was saved. ”, Which looks strange if you want to remove the variable. However, if you run a new command line, then set st will show that there are no variables starting with the letters "st"
(correction - I found that setx stackoverflow "" does not delete its variable in the registry as an empty string .. SET command, although it interprets it as if there was no variable. if not defined stackoverflow echo Not defined says that it is not defined.)