'"C:"' is not recognized as an internal or external command, operable program or batch file. #16518

Closed
opened 2026-01-31 05:14:31 +00:00 by claunia · 5 comments
Owner

Originally created by @ghost on GitHub (Jan 27, 2022).

Windows Terminal version

1.11.3471.0

Windows build number

10.0.19042.985

Other Software

When running cmd.exe through windows terminal or otherwise, terminal spits out

Microsoft Windows [Version 10.0.19042.985]
(c) Microsoft Corporation. All rights reserved.
'"C:"' is not recognized as an internal or external command,
operable program or batch file.

I haven't found a fix for this yet.

My shortcut to Command Prompt in the Windows System folder has been modified to start in [ c:\ ] . Changing this back to the default starting location does not fix the issue. I also noticed windows terminal automatically point to the %HomeDrive%%HomePath% directory when a new page is opened, so I see this terminal application as an advanced shortcut or even GUI for cmd.exe.
This being said both methods (and some others ) for booting command prompt all show the same error being :
" '"C:"' is not recognized as an internal or external command,
operable program or batch file. "

This obviously points to the issue being something to do with the version calling command , or something further from the shell , which I am not versed in dealing with .. Otherwise this error causes no real issues , it's just sort of annoying to see every time I open the shell . Any solutions for getting rid of this junk text would be super appreciated :)

Steps to reproduce

null

Expected Behavior

To not see the error
'"C:"' is not recognized as an internal or external command,
operable program or batch file.

Actual Behavior

Microsoft Windows [Version 10.0.19042.985]
(c) Microsoft Corporation. All rights reserved.
'"C:"' is not recognized as an internal or external command,
operable program or batch file.

c:>

Originally created by @ghost on GitHub (Jan 27, 2022). ### Windows Terminal version 1.11.3471.0 ### Windows build number 10.0.19042.985 ### Other Software When running cmd.exe through windows terminal or otherwise, terminal spits out Microsoft Windows [Version 10.0.19042.985] (c) Microsoft Corporation. All rights reserved. '"C:"' is not recognized as an internal or external command, operable program or batch file. I haven't found a fix for this yet. My shortcut to Command Prompt in the Windows System folder has been modified to start in [ c:\ ] . Changing this back to the default starting location does not fix the issue. I also noticed windows terminal automatically point to the %HomeDrive%%HomePath% directory when a new page is opened, so I see this terminal application as an advanced shortcut or even GUI for cmd.exe. This being said both methods (and some others ) for booting command prompt all show the same error being : " '"C:"' is not recognized as an internal or external command, operable program or batch file. " This obviously points to the issue being something to do with the version calling command , or something further from the shell , which I am not versed in dealing with .. Otherwise this error causes no real issues , it's just sort of annoying to see every time I open the shell . Any solutions for getting rid of this junk text would be super appreciated :) ### Steps to reproduce null ### Expected Behavior To not see the error '"C:"' is not recognized as an internal or external command, operable program or batch file. ### Actual Behavior Microsoft Windows [Version 10.0.19042.985] (c) Microsoft Corporation. All rights reserved. '"C:"' is not recognized as an internal or external command, operable program or batch file. c:\>
Author
Owner

@237dmitry commented on GitHub (Jan 27, 2022):

My shortcut to Command Prompt in the Windows System folder has been modified to start in [ c:\ ]

Try to set or change startingDirectory in Command Prompt profile

Screenshot 2022-01-27 144453

@237dmitry commented on GitHub (Jan 27, 2022): > My shortcut to Command Prompt in the Windows System folder has been modified to start in [ c:\ ] Try to set or change `startingDirectory` in `Command Prompt` profile ![Screenshot 2022-01-27 144453](https://user-images.githubusercontent.com/78153320/151353016-fabc8293-e8b9-487e-9b1a-18de71e8b910.png)
Author
Owner

@zadjii-msft commented on GitHub (Jan 27, 2022):

@raspy313 What's the output of the following two commands?

reg query "HKCU\Software\Microsoft\Command Processor"
reg query "HKLM\Software\Microsoft\Command Processor"
@zadjii-msft commented on GitHub (Jan 27, 2022): @raspy313 What's the output of the following two commands? ```cmd reg query "HKCU\Software\Microsoft\Command Processor" reg query "HKLM\Software\Microsoft\Command Processor" ```
Author
Owner

@ghost commented on GitHub (Jan 27, 2022):

@raspy313 What's the output of the following two commands?

reg query "HKCU\Software\Microsoft\Command Processor"
reg query "HKLM\Software\Microsoft\Command Processor"

image

@ghost commented on GitHub (Jan 27, 2022): > @raspy313 What's the output of the following two commands? > > ```batchfile > reg query "HKCU\Software\Microsoft\Command Processor" > reg query "HKLM\Software\Microsoft\Command Processor" > ``` ![image](https://user-images.githubusercontent.com/79676086/151456243-9c3e037a-1f59-46ef-8505-b6cbe788f06b.png)
Author
Owner

@zadjii-msft commented on GitHub (Jan 27, 2022):

Well that'll do it. Delete that regkey. I'd be suspicious of anything that did write to that reg key 👀

@zadjii-msft commented on GitHub (Jan 27, 2022): Well that'll do it. Delete that regkey. I'd be suspicious of anything that did write to that reg key 👀
Author
Owner

@ghost commented on GitHub (Jan 27, 2022):

[SOLUTION] edit 3/6/2022

The Following Commands Will fix the issue of bad text displaying on CMD startup

reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun /d "C:|

reg delete "HKCU\Software\Microsoft\Command Processor" /v AutoRun /f

Furthermore , for a completely clear starting command prompt ,

  • in regedit.exe find "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command [Processor"
    cmd_capture

  • And create a String Value, with the Value Data being "cls"

citation , borrowed from https://devblogs.microsoft.com/oldnewthing/20170221-00/?p=95515

@ghost commented on GitHub (Jan 27, 2022): [SOLUTION] edit 3/6/2022 > The Following Commands Will fix the issue of bad text displaying on CMD startup **reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun /d \"C:|** **reg delete "HKCU\Software\Microsoft\Command Processor" /v AutoRun /f** Furthermore , for a completely clear starting command prompt , - in regedit.exe find **"Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command [Processor"** ![cmd_capture](https://user-images.githubusercontent.com/79676086/156928825-178fb593-7ea7-4fdb-a389-df49ebc1a62b.JPG) - And create a String Value, with the Value Data being **"cls"** citation , borrowed from https://devblogs.microsoft.com/oldnewthing/20170221-00/?p=95515
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16518