Start.exe Problems

  • Thread starter Thread starter Jerry Baker
  • Start date Start date
J

Jerry Baker

I want to run a program using start.exe. The help specifies that you can
pass parameters to the started program, but I cannot get this to work if
the program's path is enclosed in quotes. My command line is this:

start "C:\Windows\system32\netstat.exe" -a

I get the error "Windows cannot find '-a'..."

If I use:

start C:\Windows\system32\netstat.exe -a

It works fine. The question is, how do I use start to launch a program
located in a path containing spaces?

Thanks.
 
Not sure, if I am correct but you can still give it a try:

I have a program called Tally. The executable file path was C:\Tally
7.2\Tally72.exe.

I used the following command:

start /d "C:\Tally 7.2" Tally72.exe

I think the /D switch puts you in that directory in verbose mode and then
look for the program name given after the quotes. It worked for me.

Hope this helps you, let us know!

"Jerry Baker" wrote:

> I want to run a program using start.exe. The help specifies that you can
> pass parameters to the started program, but I cannot get this to work if
> the program's path is enclosed in quotes. My command line is this:
>
> start "C:\Windows\system32\netstat.exe" -a
>
> I get the error "Windows cannot find '-a'..."
>
> If I use:
>
> start C:\Windows\system32\netstat.exe -a
>
> It works fine. The question is, how do I use start to launch a program
> located in a path containing spaces?
>
> Thanks.
>
 
"Jerry Baker" <jerry@nodomain.invalid> wrote in message
news:OhC9ygSPIHA.6060@TK2MSFTNGP05.phx.gbl...
>I want to run a program using start.exe. The help specifies that you can pass
>parameters to the started program, but I cannot get this to work if the
>program's path is enclosed in quotes. My command line is this:
>
> start "C:\Windows\system32\netstat.exe" -a
>
> I get the error "Windows cannot find '-a'..."
>
> If I use:
>
> start C:\Windows\system32\netstat.exe -a
>
> It works fine. The question is, how do I use start to launch a program located
> in a path containing spaces?
>
> Thanks.


Open a command prompt window and enter start /?. Notice how the parameter title
is enclosed in quotes. If the path to your command needs to be enclosed in
quotes you have to either provide a title, which can be blank, or put the quotes
only around the portion of the command which contains spaces.

start "" "Path to command"

Note the empty double quotes before the command.

start C:\"Path to"\command

Note the quotes around the part of the command which has spaces.

Just out of curiosity, how are you running netstat. The only way I could get it
to run effectively using the start command was to enter the following at a
command prompt.

start "" cmd.exe /K "C:\Windows\system32\netstat.exe" -a

Good luck

Nepatsfan
 
Nepatsfan wrote:
> start "" "Path to command"


This works. Thank you.

> Just out of curiosity, how are you running netstat. The only way I could get it
> to run effectively using the start command was to enter the following at a
> command prompt.


It was just an example.
 
"Jerry Baker" <jerry@nodomain.invalid> wrote in message
news:%23rZvX0UPIHA.292@TK2MSFTNGP02.phx.gbl...
> Nepatsfan wrote:
>> start "" "Path to command"

>
> This works. Thank you.
>
>> Just out of curiosity, how are you running netstat. The only way I could get
>> it to run effectively using the start command was to enter the following at a
>> command prompt.

>
> It was just an example.



You're welcome. Thanks for letting us know your problem is fixed.

Nepatsfan
 
Back
Top