CMD internal DOS command could not recognized valid external DOS command

%3CLINGO-SUB%20id%3D%22lingo-sub-2963324%22%20slang%3D%22en-US%22%3ECMD%20internal%20DOS%20command%20could%20not%20recognized%20valid%20external%20DOS%20command%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2963324%22%20slang%3D%22en-US%22%3E%3CP%20class%3D%22%22%3EC%3A%5CWindows%5CSystem32%20is%20in%20PATH%20setting.%20External%20DOS%20commands%20(%20e.g.%20more.com%2C%20reg.exe)%20can%20be%20executed%20when%20called.%20However%2C%20there%20are%20not%20able%20to%20recognized%20by%20CMD%20when%20calling%20it%20together%20with%20internal%20DOS%20command.%3C%2FP%3E%3CP%20class%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22%22%3EFirst%20example%2C%20piping%20with%20external%20command%20like%20more.com%20using%20DOS%20command%20not%20working%20only%20on%20my%20Windows%2010%3B%20however%2C%20other%20Windows%2010%20laptop%20do%20not%20have%20this%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3EMicrosoft%20Windows%20%5BVersion%2010.0.19043.1288%5D%0AC%3A%5CWindows%5CSystem32%26gt%3Btype%20drivers%5Cgmreadme.txt%20%7C%20more%0A'.COM%3B.EXE%3B.BAT%3B.CMD%3B.VBS%3B.VBE%3B.JS%3B.JSE%3B.WSF%3B.WSH%3B.MSC'%20is%20not%20recognized%20as%20an%20internal%20or%20external%20command%2C%20operable%20program%20or%20batch%20file.%0A%0AC%3A%5CWindows%5CSystem32%26gt%3Bdir%20%7C%20more%0A'.COM%3B.EXE%3B.BAT%3B.CMD%3B.VBS%3B.VBE%3B.JS%3B.JSE%3B.WSF%3B.WSH%3B.MSC'%20is%20not%20recognized%20as%20an%20internal%20or%20external%20command%2C%20operable%20program%20or%20batch%20file.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22chinyenchai_2-1636894469319.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F326939i5F8B8E86385A541A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22chinyenchai_2-1636894469319.png%22%20alt%3D%22chinyenchai_2-1636894469319.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EHowever%2C%20external%20command%20more.com%20can%20pipe%20with%20%22more%22%20for%20pagination.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22chinyenchai_3-1636894582546.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F326940iB96AC97E653919B5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22chinyenchai_3-1636894582546.png%22%20alt%3D%22chinyenchai_3-1636894582546.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22%22%3EOther%20internal%20DOS%20command%20like%20%22for%22%20could%20not%20execute%20external%20command%20in%20CMD.%3C%2FP%3E%3CP%3EExample%202%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3EC%3A%5C%26gt%3Bfor%20%2Ff%20%22tokens%3D3%22%20%25a%20in%20('reg%20query%20%22HKCU%5CControl%20Panel%5CInternational%22%20%2Fv%20iDate')%20do%20set%20%22iDate%3D%25a%22%0A'reg%20query%20%22HKCU%5CControl%20Panel%5CInternational%22%20%2Fv%20iDate'%20is%20not%20recognized%20as%20an%20internal%20or%20external%20command%2C%20operable%20program%20or%20batch%20file.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22chinyenchai_4-1636894742336.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F326941iFA3338129F713F9D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22chinyenchai_4-1636894742336.png%22%20alt%3D%22chinyenchai_4-1636894742336.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20same%20happened%20when%20internal%20DOS%20command%20executed%20in%20batch%20file%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22chinyenchai_5-1636894968991.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F326942i85143A41E5B1CF99%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22chinyenchai_5-1636894968991.png%22%20alt%3D%22chinyenchai_5-1636894968991.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22%22%3EMuch%20appreciate%20if%20this%20issue%20can%20be%20resolved%20without%20the%20need%20of%20reinstall%2Freformat%20Windows%2010.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20options%20like%20Windows%2010%20update%20and%20SFC%20%2FSCANNOW%2C%20but%20could%20not%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECommand%20Processor%20registry%20setting%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22chinyenchai_6-1636895050423.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F326943i02E922F2EE151B34%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22chinyenchai_6-1636895050423.png%22%20alt%3D%22chinyenchai_6-1636895050423.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

C:\Windows\System32 is in PATH setting. External DOS commands ( e.g. more.com, reg.exe) can be executed when called. However, there are not able to recognized by CMD when calling it together with internal DOS command.

 

First example, piping with external command like more.com using DOS command not working only on my Windows 10; however, other Windows 10 laptop do not have this issue.

 

Example:

 

Microsoft Windows [Version 10.0.19043.1288]
C:\Windows\System32>type drivers\gmreadme.txt | more
'.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC' is not recognized as an internal or external command, operable program or batch file.

C:\Windows\System32>dir | more
'.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC' is not recognized as an internal or external command, operable program or batch file.

 

 

 
 

chinyenchai_2-1636894469319.png

 

However, external command more.com can pipe with "more" for pagination.

chinyenchai_3-1636894582546.png

 

Other internal DOS command like "for" could not execute external command in CMD.

Example 2:

 

C:\>for /f "tokens=3" %a in ('reg query "HKCU\Control Panel\International" /v iDate') do set "iDate=%a"
'reg query "HKCU\Control Panel\International" /v iDate' is not recognized as an internal or external command, operable program or batch file.

 

 

chinyenchai_4-1636894742336.png

 

The same happened when internal DOS command executed in batch file:

chinyenchai_5-1636894968991.png

 

Much appreciate if this issue can be resolved without the need of reinstall/reformat Windows 10.

 

I have tried options like Windows 10 update and SFC /SCANNOW, but could not help.

 

Command Processor registry setting:

chinyenchai_6-1636895050423.png

 

 

 

0 Replies