Changing PATH does not take effect


  1. Posts : 5
    Windows 10
       #1

    Changing PATH does not take effect


    I have extended the PATH as in the attached screenshot, but when I open a new CMD Prompt, the directory I have placed at the end of the PATH is missing.

    Changing PATH does not take effect-capture_20190611_161205.jpg
      My Computer


  2. Posts : 8,111
    windows 10
       #2

    Welcome to the forum how long is your path as there is a limit which you can change https://www.howtogeek.com/266621/how...60-characters/

    Enable or Disable Win32 Long Paths in Windows 10
      My Computer


  3. Posts : 5
    Windows 10
    Thread Starter
       #3

    As you can see from the screenshot, about 50-60 characters. I just added the directory C:\WBIN to the default path.

    I sincerely hope that we can have more than a few dozen characters in the path.

    And here is another screenshot, which shows how the path is represented in the environmen variable editing window:

    Changing PATH does not take effect-capture_20190611_163254.jpg

    At least to me, it looks reasonable. But when I open a CMD console, the Path looks like this:

    Changing PATH does not take effect-capture_20190611_163451.jpg
      My Computer


  4. Posts : 1,255
    Windows 10 Pro
       #4

    The maximum length of a file path in Windows is normally 260 characters but the path environment variable is something quite different. In Windows 7 and later it's maximum length is 4095 characters. Prior to Windows 7 it was 2047 characters. Software used to manipulate this variable may impose a lower limit. I don't know the maximum for the dialog box but it is certainly more than 60 characters.

    In my browser the URL shown in post #2 shows "..60 characters" but if you go to the article it shows 260. This is due to the displayed URL being shortened by the browser. But as mentioned previously this is not a limit on the environment variable.

    Have you done a log off - login cycle after changing the environment variable?

    When a process starts it normally inherits it's environment variables from the parent process. Typically this will be the explorer.exe process and it will only see updated environment variables when it starts
      My Computer


  5. Posts : 6,345
    Windows 11 Pro - Windows 7 HP - Lubuntu
       #5

    I don't know if it still apply to Win 10 but on a cmd window
    Path shows the current path variable
    Path= sets new path variable
    Path=%path%; xxxx adds xxxx to current path variable
      My Computers


  6. Posts : 1,255
    Windows 10 Pro
       #6

    Megahertz said:
    I don't know if it still apply to Win 10 but on a cmd window
    Path shows the current path variable
    Path= sets new path variable
    Path=%path%; xxxx adds xxxx to current path variable
    Those commands work the same as they always have.
    But be aware that they only apply to the current cmd session. Each process has their own private copy of the environment variables which are modified independently of others. When the cmd window closes the changes are lost. To make permanent changes you must use the setx command or the dialog mentioned box previously.
      My Computer


  7. Posts : 5
    Windows 10
    Thread Starter
       #7

    LMiller7 said:
    Have you done a log off - login cycle after changing the environment variable?
    Yes, no change, though in this case, it should not matter. Whenever I open a new command Window, I do get a new CMD console Window, and it should use the actual environment settings. No logoff needed.

    When working with Windows 7, my PATH variable was set to a string of about 300 characters. It would be ridiculous, if this were not possible in Windows 10 too.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 08:52.
Find Us




Windows 10 Forums