-2

Crossposting note: I have already opened a discussion on this topic on the Windows 10 forum, but did not get any useful answer.

I want to extend the PATH to include also my directory C:\WBIN. I modified it using the control center for environment variables, as seen in this screenshot, but when I open a command line console, my directory is not in the path.

Revising the settings, I still can see my path entered. Why doesn't this change take effect, when I start a new process?

9
  • AFAIK, Windows reads in the PATH variables at boot. Have you tried re-booting? Jun 17, 2019 at 9:47
  • Of course! However, this should not be necessary. A change in the environment variables should affect every process created afterwards. Jun 17, 2019 at 9:47
  • 2
    Sorry, I can't see your uptime from here... Also, should != does. Jun 17, 2019 at 9:49
  • I would surprised if this behaviour of Windows changed. In the previous versions (XT, 7, 8) which I had used, a reboot was not necessary. Jun 17, 2019 at 9:53
  • 1
    Strictly speaking, PATH changes are applied on login. You have to log out and log in, full reboot is not necessary. This was the case since forever, including XP, 7 and 8.
    – gronostaj
    Jun 17, 2019 at 9:56

1 Answer 1

0

SOLVED!

I found a discussion about the same problem here, which contained a solution which actually worked:

Instead of updating my PATH using the control center (which seems to be broken somehow), I opened a command line window and used the command

SETX PATH="%PATH%";C:\WBIN

After this, no logout required: Every new process sees this PATH, and the settings survive a reboot.

5
  • How is the "control center" broken?
    – gronostaj
    Jun 17, 2019 at 10:56
  • In that AFIK we are supposed to be able to set environment variables through the control center too. At least in previous Windows versions, this worked well. Jun 17, 2019 at 12:14
  • As we explained in comments, we are. It just requires a relogin and it always did, at least since Windows 2000 if my memory serves well. I suppose it was always like this (probably inspired by Unix?).
    – gronostaj
    Jun 17, 2019 at 12:59
  • Well, but I did a relogin, and the PATH was not changed. Only after I set it with setx, the change had an effect. And on my previous system (Win7), I often fiddled with the path, either manually, or by installing programs where the installer put their directory into the path, and a relogin was never needed. Maybe the initial environment settings are stored in the registry, and every new process gets its environment from there? Of course it's just a guess, but with this architecture, a relogin would not make sense. Jun 18, 2019 at 6:45
  • @gronostaj : Indeed, the registry seems to be used for the environment. See this guide. But you seem to be right: In the last sentence, the page also says that you even have to reboot, which seems to be a weird requirement to me. Jun 18, 2019 at 6:49

You must log in to answer this question.

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