21

I thought maybe it was a system issue but recently did a fresh install (win7 64bit) and a clean install of conemu (had same problem with both conemu and console2 on old win32 system). Also everything I find researching has to do with adding variables via the command line. I'm doing this through Start->Control Panel->System->Advanced System Settings and then restarting the console. cmd picks up the path correctly.

When I manually add a new path to the system or user PATH variable and then restart the console and echo %path% it has not re-loaded the new PATH variable.

cmd.exe:

C:\Users\lotus>echo %path% C:\Python33\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\ System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;C:\PHP;C:\ProgramData\ Composer\bin;C:\PHP;C:\PHP\ext;C:\Ruby200-x64\bin;C:\Users\lotus\AppData\Roaming \npm 

conemu:

C:\Program Files\ConEmu>echo %path% C:\Program Files\ConEmu\ConEmu;C:\Program Files\ConEmu;C:\Python33\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Ruby200-x64\bin 

I know there is a extra C:\PHP but that's another issue. I still have the same problem if I remove that.

Thanks

3 Answers 3

29

When you are using alternative tab based terminals like ConEmu or Console2, you need to restart the terminal, not a single console (read tab)!

This is because child processes inherit their environment their direct parent process, not from the system!

Sometimes explorer (or whatever shell you are using to start ConEmu) needs to be restarted, as in you have to kill explorer.exe, so your start menu disappears and relaunch it from task manager. If all else fails, log off and on again.

Sign up to request clarification or add additional context in comments.

10 Comments

"When you are using alternative terminals like ConEmu or Console2, you need to restart not a console (read tab), but while terminal!" Not sure what you mean by this. I closed conemu completely and then reopen it. I also tried restarting explorer via task manager and that didn't work. But logging off and back on works. It's slightly irritating to have to do but saves a system restart.
I've never seen that personally, and can't understand how that may happens... Seems like Explorer or OS bug. I've write about restating the whole terminal, because you have not said that "conemu was closed and restarted again".
Oh ok yeah I completely closed it. Maybe researching what all shuts down on a logoff (explorer.exe, dwm.exe, winlogon.exe?, etc.) I can figure out if there is a way to do it without actually logging off. But if not, it's not a big deal to log off. Thanks
I was opening comemu from a "explorer" window (there was no comemu process). Only got the new path after closing the explorer window.
|
3

Even if ConEmu is closed, there is a ConEmu64.exe process. Need to kill it.

1 Comment

That may be if user have chosen to minimize (or hide to the notification area) the GUI (main ConEmu window) instead of terminate it.
0

Create this user settings ConEmu file:

"%USERPROFILE%\.conemu\CmdInit.cmd" 

Put this code in the file CmdInit.cmd:

:: Retrieve User & System PATHS from the registry for /f "tokens=2,*" %%A in ('reg query "HKCU\Environment" /v Path ^| find "Path"') do set USER_PATH=%%B for /f "tokens=2,*" %%A in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path ^| find "Path"') do set SYS_PATH=%%B :: Merge PATHS with ConEmu's PATH set "PATH=%ConEmuBaseDir%\Scripts;%USER_PATH%%SYS_PATH%" 

Now every time ConEmu runs it will update the paths.

Docs:
ConEmu Configuring Cmd Prompt

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.