Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

cmd.exe opening issue

Posted on 2014-04-01
10
Medium Priority
?
407 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 earned 2000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
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…
Suggested Courses

885 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