Solved

cmd.exe opening issue

Posted on 2014-04-01
10
395 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

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.

Question has a verified solution.

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

Suggested Solutions

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…
OfficeMate Freezes on login or does not load after login credentials are input.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

756 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