0

I installed Java RE and Git, for example, and made sure their binaries were added to Environment Path Variables under both User and System variables. When I launch a command prompt from the taskbar, these variables work properly (i.e. commands "java" and "git" are recognized.

I also added "open command window here" to background context by editing the registry. But when I open a command prompt using this method, my environment path variables aren't recognized.

How can I make the command prompt recognize my environment variables when opened this way?

3
  • Can you provide information on the registry key you added? Also, have you logged off/on or restarted such that Explorer.exe has restarted. I assume that the "cmd" window is inheriting the Explorer environment which doesn't yet have the new PATH variables. Dec 23, 2019 at 20:40
  • Are there different users? Type path in either of the two CMD prompts to see if the Registry hack is leading to the wrong users, inheriting a different PATH (although the System PATH should be the same for both). Dec 24, 2019 at 0:24
  • What's the reasoning for adding to both the user and system PATH? Shouldn't it be one or the other if it's the same location that's being added?
    – JW0914
    Dec 24, 2019 at 13:13

1 Answer 1

0

Reading the first comment made me realize I didn't restart explorer.exe. Doing so fixed the issue.

1
  • So I suggest to delete the question.
    – harper
    Dec 27, 2019 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.