Solved

Batch file START command -  application path with space

Posted on 2007-03-29
4
6,370 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
4 Comments
 
LVL 22

Expert Comment

by:Bartender_1
Comment Utility
try this:

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

Hope this helps!

:o)

Bartender_1
0
 
LVL 87

Expert Comment

by:rindi
Comment Utility
Try C:\Progra~1\abc.exe
0
 

Author Comment

by:jshao825
Comment Utility
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 82

Accepted Solution

by:
oBdA earned 50 total points
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

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

9 Experts available now in Live!

Get 1:1 Help Now