?
Solved

Batch file START command -  application path with space

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

Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

752 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