PATH environment variable is represented by a single row in explorer GUI

In Explorer, when trying to edit the PATH environment variable on Windows 10 via Control Panel\All Control Panel Items\System » Advanced » Environment Variables, PATH is represented by a single row:

  •  %JAVA_HOME%\bin;%SPARK_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\PuTTY\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;%HADOOP_HOME%;
    
    Screenshot:Screenshot1

Usually, the GUI of the variable, represented by multiple rows, is shown:

  • How to Edit Your System PATH for Easy Command Line Access in Windows
  • How to Add to Windows PATH Environment Variable
    Screenshot2

How do I access the GUI multi-row table for the PATH environment variable as shown above?


Solution 1:

The first element of the list must not be the percent sign character (used as variable expansion character on MsDOS/Windows) for the graphical editor to show the variable as a multi-line list unless the variable to expand is %SYSTEMROOT%.

This is a "bug" in C:\Windows\System32\SystemPropertiesAdvanced.exe that's been present since the introduction of the multi-line editor in Windows 10 build 10586 (November 2015 update). It looks like this "bug" is an oversight by Microsoft since %SYSTEMROOT%\System32 and %SYSTEMROOT% (in that order) should always be present in your Path environment variable anyway.

You can simply prepend those two elements to the Path environment variable in order to solve this problem.
For example:

 %JAVA_HOME%\bin;%SPARK_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\PuTTY\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;%HADOOP_HOME%;

Becomes:

 %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;%JAVA_HOME%\bin;%SPARK_HOME%\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\PuTTY\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;%HADOOP_HOME%;