Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Running exe which has spaces in path  (Read 6060 times)

0 Members and 1 Guest are viewing this topic.

99miles

  • Guest
Running exe which has spaces in path
« 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"

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: Running exe which has spaces in path
« 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-)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

Dusty



    Egghead

  • I could if she would, but she won't so I don't.
  • Thanked: 75
  • Experience: Beginner
  • OS: Windows XP
Re: Running exe which has spaces in path
« Reply #2 on: May 06, 2006, 02:47:58 AM »
Just don't use Start

One good deed is worth more than a year of good intentions.

almn

  • Guest
Re: Running exe which has spaces in path
« 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"

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: Running exe which has spaces in path
« 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-)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

Dusty



    Egghead

  • I could if she would, but she won't so I don't.
  • Thanked: 75
  • Experience: Beginner
  • OS: Windows XP
Re: Running exe which has spaces in path
« 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.


One good deed is worth more than a year of good intentions.

99miles

  • Guest
Re: Running exe which has spaces in path
« 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!