Solved

Batch file START command -  application path with space

Posted on 2007-03-29
4
6,393 Views
Last Modified: 2013-12-28
I am new to creating a batch file..

I want to use the START command to execute an application. Since the application path has space, the command failed. I tried putting double quote around the application path, but still doesn't work.

START /WAIT C:\Program Files\abc.exe

Can anyone help ?

0
Comment
Question by:jshao825
[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
4 Comments
 
LVL 22

Expert Comment

by:Christopher McKay
ID: 18818626
try this:

start "c:\Program Files\abc.exe" /wait

Hope this helps!

:o)

Bartender_1
0
 
LVL 88

Expert Comment

by:rindi
ID: 18818647
Try C:\Progra~1\abc.exe
0
 

Author Comment

by:jshao825
ID: 18818852
How about for C:\Progra~1\test folder\abc.exe

I tried C:\Progra~1\test~1\abc.exe   but didn't work
0
 
LVL 84

Accepted Solution

by:
oBdA earned 50 total points
ID: 18818910
The syntax of the start command is somewhat incorrectly described ("start /?"). The problem is that if you put spaces around the path, you *have* to specify the title, or the program path will be considered the title, and the program won't be run. It runs fine without title if there are no spaces and no quotes, though.
Anyway, just use
start "" /wait "C:\Program Files\abc.exe"
Note the empty pair of quotes before the "/wait", they're doing the trick. You can of course use
start "abc" /wait "C:\Program Files\abc.exe"
as well.
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
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). …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

749 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