Solved

cmd.exe opening issue

Posted on 2014-04-01
10
386 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
 
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

919 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now