4

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 do I access the GUI multi-row table for the PATH environment variable as shown above?

6
  • Have you tried Open Control Panel » System » Advanced » Environment Variables?
    – DavidPostill
    Commented Jun 30, 2020 at 12:16
  • Yes. This is exactly what happened (I clarify my question) Commented Jun 30, 2020 at 12:18
  • Interesting, I've never seen the multi-line one before.
    – gronostaj
    Commented Jun 30, 2020 at 12:35
  • @gronostaj The multi-line GUI window was added in Windows 10, though not sure in what bi-annual update (I noticed in a year or so ago).
    – JW0914
    Commented Jun 30, 2020 at 12:47
  • @user3563894 An FYI about the System PATH: the OS entries should be first, with any additions added to the bottom of PATH in the GUI or at the end of PATH if as a single line (the User PATH can have entries anywhere). It's likely there's a Registry setting for showing the PATH GUI, however you may as well rule out system file corruption by executing the following in an Admin terminal, in the order listed: Dism /Online /Cleanup-Image /StartComponentCleanupDism /Online /Cleanup-Image /RestoreHealth → Reboot → SFC /ScanNow → Reboot → Test if issue still exists.
    – JW0914
    Commented Jun 30, 2020 at 13:32

1 Answer 1

6

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%;
2
  • Saved me a lot of time! Thanks.
    – Frankie
    Commented Feb 11, 2022 at 23:54
  • As of W10 22H2 (3448), this bug has been fixed. Commented Sep 22, 2023 at 10:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .