• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1266
  • Last Modified:

CMD.EXE prompt showing short path

I have  a Windows Server 2003 R2 SP2 server. When I launch CMD.EXE, the prompt shows the short path. Note that using DIR works properly, showing the full long filename path. Only the prompt itself defaults to the short path. Verified that the PROMPT environment variable is correctly set to $P$G. Verified that there are no other variables that would affect the prompt. Verified that there is no unusual garbage in HKLM\SOFTWARE\Microsoft\Command Processor. Verified that we are, in fact, running the NT command processor (CMD.EXE) and not the legacy console (COMMAND.COM). Any ideas?
0
jaredfaulkner
Asked:
jaredfaulkner
  • 2
  • 2
  • 2
  • +1
3 Solutions
 
QlemoC++ DeveloperCommented:
It is not clear if the "unusual garbage" check includes the AutoRun registry value under Command Processor reg key?
0
 
jaredfaulknerAuthor Commented:
The AutoRun REG_SZ is present but empty.
0
 
QlemoC++ DeveloperCommented:
Did you cross-check the same key for your user? If the user key value is empty, too, you should nevertheless try with a cmd /e:off, to switch any AutoRun action.

You could try to use an other cmd.exe (from Service pack uninstall folders, or WinSxS; or from another server), to make sure it's not screwed up somehow.
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
WumpusHunterCommented:
That's really odd. Does it still do it when you start > run this command?:

%SystemRoot%\system32\cmd.exe /D
0
 
jaredfaulknerAuthor Commented:
I've verified that that the /D and /E:OFF switches have no effect.

I found that if I run the executable directly or a specify a path directly to the executable, it launches correctly. The short path is only showing up if I launch cmd.exe by running it from the run dialog without specifying a full path.

I set an AutoRun for CurrentUser of "CD \" and this causes the prompt to behave correctly (starting from root, of course).

Verified that the executable was good by comparing files, running sfc, and finally copying a known good executable.
0
 
knightEknightCommented:
Have you confirmed that there is only one cmd.exe in the PATH?

....  e.g. check each directory in %PATH% for cmd.exe
0
 
WumpusHunterCommented:
Did you search the system drive for any batch files named cmd.bat or cmd.cmd that may be launching it differently?
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now