Cmder: "\config\profile.d\Active"' is not recognized as an internal or external command, operable program or batch file.

Created on 28 Sep 2016  路  12Comments  路  Source: cmderdev/cmder

Every time I open cmder, no matter directly double click the .exe file or via 'cmder here' form the context menu.

I use the windows 10 1607

It shows the following first:

Active code page: 65001
Found old git version in "C:Users", but not using...
'"D:OneDrivePersonalSoftwarecmderconfigprofile.dActive"' is not recognized as an internal or external command, operable program or batch file.

  1. The first line is because I changed the code page to UTF8.
  2. The second problem may occur due to I have two git, one is windows version git, the other is installed from the Linux subsystem via sudo apt-get install git.
  3. The 3rd line is really annoying.

How to solve the 2rd and 3rd line issue?

Most helpful comment

A better solution here for someone who wish to change the system-wide command line code page in order to use new font in the default windows command line, this is the solution:

When you change this position:
[HKEY_LOCAL_MACHINESoftwareMicrosoftCommand ProcessorAutorun]
Change to this:
@chcp 65001>nul

Cmder will be fine since no output like Active code page: 65001 will be shown

All 12 comments

'dir D:OneDrivePersonalSoftwarecmderconfigprofile.d' output? I'm guessing you have a '*.cmd' file in that folder that begins with 'Active' and has spaces in it.

@daxgames hi, it's empty :D

Edit %cmder_root%\vendor\init.bat and change if not defined verbose-output ( set verbose-output=0 ) to if not defined verbose-output ( set verbose-output=1 ).

Start a new cmder tab and paste the output here.

Active code page: 65001
Found old git version in "C:Users", but not using...
Enhancing PATH with unix commands from git in "C:Program FilesGitusrbin"
Calling "D:OneDrivePersonalSoftwarecmderconfigprofile.dActive"...
'"D:OneDrivePersonalSoftwarecmderconfigprofile.dActive"' is not recognized as an internal or external command,
operable program or batch file.

Seems it wants to call something which is not exist..

The code that is calling that is below:

pushd "%CMDER_ROOT%\config\profile.d"
for /f "usebackq" %%x in ( `dir /b *.bat *.cmd 2^>nul` ) do (
  call :verbose-output Calling "%CMDER_ROOT%\config\profile.d\%%x"...
  call "%CMDER_ROOT%\config\profile.d\%%x"
)
popd

In cmder to the following:

cd %CMDER_ROOT%\config\profile.d
dir /b *.bat *.cmd 2^>nul

Paste output here.

位 cd %CMDER_ROOT%configprofile.d

D:OneDrivePersonalSoftwarecmderconfigprofile.d
位 ls

D:OneDrivePersonalSoftwarecmderconfigprofile.d
位 dir /b *.bat *.cmd 2^>nul
File Not Found

D:OneDrivePersonalSoftwarecmderconfigprofile.d

:(

I have no idea. I don't know why it would find something there during startup and not after.

In %cmder_root%\vendor\init.bat add dir /b 2>nul on a new line after pushd "%CMDER_ROOT%\config\profile.d"

Start a new cmder tab and paste the output here.

Have you tried removing whatever you did to change the codepage and starting a new cmder window?

Does this happen when you start a powershell session or a bash session?

Thank you so much sir.
I remove what I did to the code page, and the extra line is gone...
Just weird, how can a register value affect this situation...

I just changed the register value:
HKEY_LOCAL_MACHINESoftwareMicrosoftCommand ProcessorAutorun

Thanks for your time! Really helps!

A better solution here for someone who wish to change the system-wide command line code page in order to use new font in the default windows command line, this is the solution:

When you change this position:
[HKEY_LOCAL_MACHINESoftwareMicrosoftCommand ProcessorAutorun]
Change to this:
@chcp 65001>nul

Cmder will be fine since no output like Active code page: 65001 will be shown

Glad you fixed it.

You could add that command to %cmder_root%configuser-profile.cmd instead of the registry and it would be portable.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zsedcbm picture zsedcbm  路  3Comments

bmeverett picture bmeverett  路  3Comments

sathishsoundharajan picture sathishsoundharajan  路  3Comments

brunowego picture brunowego  路  3Comments

GlassGruber picture GlassGruber  路  3Comments