Solved

cmd.exe opening issue

Posted on 2014-04-01
10
383 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
Comment Utility
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
Comment Utility
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
Comment Utility
you need to run like below

cmd.exe /k "CD D:"
0
 
LVL 16

Expert Comment

by:Brian Pringle
Comment Utility
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
Comment Utility
you can try like below

cmd /k cd /d d:
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 13

Expert Comment

by:Santosh Gupta
Comment Utility
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
Comment Utility
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
Comment Utility
you can run your file like below

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

Author Comment

by:mrosier
Comment Utility
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
Comment Utility
this did in fact answer my question
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

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…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
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 teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…

763 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

6 Experts available now in Live!

Get 1:1 Help Now