Home / Microsoft / Microsoft DOS / Running exe which has spaces in path
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: Running exe which has spaces in path  (Read 1949 times)
99miles
Guest
« on: May 05, 2006, 02:06:44 PM »

I'm trying to start an exe from a batch file. The path to the exe has spaces in it, so I put i in double quotes, and all that's happening is a new command prompt window is opening.
Any ideas?
Thanks!

START "C:\Path To My Exe\MyApp.exe"
IP logged
Sidewinder
Guru



Thanked: 97
Posts: 4,341

Experience: Familiar
OS: Windows 7

« Reply #1 on: May 05, 2006, 03:18:48 PM »

By definition, the START command opens a new window unless the /b switch is used. What are you expecting MyApp.exe to do? And is the path correct?

The quotes are valid. Need more info.

Let us know.  8-)
IP logged

If you don't know where you are going, any road will get you there

                                                                            -Lewis Carroll
Dusty
Egghead



Thanked: 72
Posts: 3,387

Experience: Beginner
OS: Windows XP


I could if she would, but she won't so I don't.

« Reply #2 on: May 06, 2006, 02:47:58 AM »

Just don't use Start

IP logged

One good deed is worth more than a year of good intentions.
almn
Guest
« Reply #3 on: May 06, 2006, 08:56:55 AM »

What he is trying to say is to use "call"  ;D
Example:
call "C:\Path To My Exe\MyApp.exe"
IP logged
Sidewinder
Guru



Thanked: 97
Posts: 4,341

Experience: Familiar
OS: Windows 7

« Reply #4 on: May 06, 2006, 04:41:33 PM »

Since this question has turned into call versus start, perhaps it would be good to find out that the OP needs to do. One thought is that CALL runs syncronously with the batch file the CALL is part of. START may or may not run in the same window as the original batch file...this has implications as to what environment strings are available to the STARTed task. The original batch file also may or may not WAIT on the STARTed task.

Let us know what you need to happen.

 8-)
IP logged

If you don't know where you are going, any road will get you there

                                                                            -Lewis Carroll
Dusty
Egghead



Thanked: 72
Posts: 3,387

Experience: Beginner
OS: Windows XP


I could if she would, but she won't so I don't.

« Reply #5 on: May 07, 2006, 12:00:22 AM »

Quote
I'm trying to start an exe from a batch file.

Based on the quote from the OP the idea is to start an exe from a batch file.  To do this neither start nor call is required.

Start is explained above by Sidewinder, Call calls one batch program from another.


IP logged

One good deed is worth more than a year of good intentions.
99miles
Guest
« Reply #6 on: May 09, 2006, 11:47:13 PM »

Sorry, the emails telling me I had responses were getting caught in my spam catcher thing..

Just directly calling the exe without start or call did the trick. Thanks y'all!
IP logged
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / Running exe which has spaces in path « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.102 seconds with 20 queries.