?
Solved

Batch file START command -  application path with space

Posted on 2007-03-29
4
Medium Priority
?
6,418 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 85

Accepted Solution

by:
oBdA earned 200 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

Independent Software Vendors: 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!

Question has a verified solution.

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

A small collection of useful tips and tricks for Windows 10 users that I decided to write as a result of recent questions that were asked and answered at Experts Exchange. Two short video tutorials included. Enjoy..
When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

650 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