Solved

cmd.exe opening issue

Posted on 2014-04-01
10
393 Views
Last Modified: 2014-04-01
Hi Folks! I am trying to open the command prompt on my Windows 7 Pro 64bit computer using the same flags as I used on my XP machine. I get an error on the Windows 7 machine that does not occur on the XP machine. I am trying to open the cmd using the following: cmd.exe /k cd /d "". I get "The filename, directory name, or volume label syntax is incorrect." as a response in the cmd window. When I do this in XP though, I am not getting any errors in the cmd window. Can anyone explain to me why I am getting this and what I can do to make it work? Thanks!
0
Comment
Question by:mrosier
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 16

Expert Comment

by:Brian Pringle
ID: 39970280
What are you trying to accomplish?  It looks like you are trying to launch a cmd instance and wait for a command to run.  Why the /d?
0
 
LVL 16

Accepted Solution

by:
Michael Ortega (Internetwerx, Inc.) earned 500 total points
ID: 39970282
Are you sure you are accessing a drive or directory that actually exists on the the Windows 7 machine?  cmd.exe /k cd /d "DRIVELETTER:" should work for you.  Have you tried using an elevated command prompt?

BB
0
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 39970291
you need to run like below

cmd.exe /k "CD D:"
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 16

Expert Comment

by:Brian Pringle
ID: 39970292
If you are trying to launch a command and wait for completion of execution, then the "start wait" command would work better.  

To see a list of available switches, go to a command line and issue the following commands.

cmd /?
start /?
0
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 39970296
you can try like below

cmd /k cd /d d:
0
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 39970297
i am also getting the same error in win7 pro.

seems you are missing to enter the path... pls check below working command

cmd /K "cd C:\Windows\"
0
 

Author Comment

by:mrosier
ID: 39970311
Hi Folks! I am trying to migrate an XP user to 7 and a piece of software that opens a command prompt this way is coming up with errors when opening it in Windows 7 but in XP it just opens. I have opened this as administrator as well. Basically I am trying to get a product called SPSS Dimensions Desktop 5.5 to run DMSRun Prompt which works just fine on the XP machine, but I get errors executing the commands on the 7 machine, and this application runs in the command prompt. I was thinking this might have something to with the fact that the command prompt is open by the program in this manner with the error I provided but in XP it just opens without any returned errors.
0
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 39970317
you can run your file like below

cmd /k cd /d "your FileName here"
0
 

Author Comment

by:mrosier
ID: 39970350
Thanks, folks, I did stick a path in the quotes, and cmd opened without that error right to the path I set. I think I have a cmd syntax error at the heart of my problem, but as this question was answered I will award points. Thanks!
0
 

Author Closing Comment

by:mrosier
ID: 39970362
this did in fact answer my question
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OfficeMate Freezes on login or does not load after login credentials are input.
By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question