Windows 10 System environment variables don't stick

Solution 1:

Did you try hitting OK to close the main Environment Variables window too? I just tried and when I edit the path and hit OK to close the Edit window, it doesn't show up. When I then hit OK and close the Environment Variables window, it shows up (after closing any existing CMD windows and opening a new one).

FYI, be careful with the steps you listed though. I find that when I hit New, then click browse and select a path, it ends up overwriting the previous path on the list instead of adding a new one. I've been hitting New, then typing something like "x". Then clicking Browse while "x" is highlighted to select the path. This looks like a bug with the new path editor.

Solution 2:

If you use any variable within another variable, this variable type must be set as REG_EXPAND_SZ in the Windows Registry. (Ex: PATH = %JAVA_HOME%\bin;...)

You can check it on the Registry (for User variables):

HKEY_CURRENT_USER\Environment\PATH 

For System Variables, check on

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

I had the same problem and changing it solved this issue for me.

enter image description here