View Single Post
  #9 (permalink)  
Old 06-30-2009, 07:40 PM
Newsgroup Contributor
 
Posts: n/a
Re: Batch File Questions

If putting the program in quotes you have to specify a title because the
first set of quotes is taken as the title.

--
..
--
"Tim Meddick" <timmeddick@gawab.com> wrote in message
news:u492Oqe%23JHA.3768@TK2MSFTNGP04.phx.gbl...
> It's probably simpler to use the "TITLE" command in a batch file to set
> the title, thusly :
>
>
>
> @echo off
> title My Program
> start /w /b "C:\Program Files\My Application\My Program" /parameters
>
>
>
> ....please note - there's no need for "quotes" after the 'title' command.
>
>
> ==
>
> Cheers, Tim Meddick, Peckham, London. :-)
>
>
>
>
> "Lushington" <Lushington@discussions.microsoft.com> wrote in message
> news:44BE1C72-2178-4163-A571-00A1D7A4B4AF@microsoft.com...
>> Interestingly, another parameter for start is "title" which "Specifies
>> the
>> title to display in Command Prompt window title bar." Even though this
>> parameter is supposedly optional, it seems that if the filename for the
>> app
>> to be executed is enclosed in double quotes (as in my example, because of
>> the
>> spaces in the path), then the start command uses the filename as the
>> title,
>> doesn't find anything to execute, and completes without doing anything.
>>
>> I had to use this syntax to get it to work:
>>
>> start "mytitle" /wait "C:\Program Files\My Application\My Program"
>> /parameters
>>
>> and you're right, /B or no /B didn't seem to make a difference.
>>
>> Start command syntax:
>> http://technet.microsoft.com/en-us/l.../bb491005.aspx
>>
>> "Tim Meddick" wrote:
>>
>>> I use the "/b" switch always (just to be on the safe side) but I think
>>> that it really only applies to 'Command-line' tools and Win16 DOS apps.
>>>
>>> ==
>>>
>>> Cheers, Tim Meddick, Peckham, London. :-)
>>>
>>>
>>>
>>>
>>> "Lushington" <Lushington@discussions.microsoft.com> wrote in message
>>> news:F3E0269E-7342-44AB-B2E0-6D952775C3CF@microsoft.com...
>>> > Thanks (and to Tim Meddick too). The help file just has /wait rather
>>> > than /w
>>> > but that's a small point.
>>> >
>>> > And I think if I use the /B parameter, it won't open a Command Prompt
>>> > window, either.
>>> >
>>> > "." wrote:
>>> >
>>> >> start "" /w Program1
>>> >> start "" /w Program2
>>> >>
>>> >> start /? for help
>>> >> --
>>> >> ..
>>> >> --
>>> >> "Lushington" <Lushington@discussions.microsoft.com> wrote in message
>>> >> news:E4484895-A1D2-4FA2-9CF7-31E0DAA75EED@microsoft.com...
>>> >> > It's been a long time since I've done any batch programming and I
>>> >> > need my
>>> >> > memory refreshed.
>>> >> >
>>> >> > If I start two applications in sequence
>>> >> >
>>> >> > @echo off
>>> >> > "C:\Program Files\My Application\My Program" /parameters
>>> >> > "C:\Program Files\Another App\Another Program" /parameters
>>> >> >
>>> >> > Does the first program have to complete before the second one
>>> >> > starts
>>> >> > (which
>>> >> > is what I want)? Or do I have to be a little fancier?
>>> >> >
>>> >> > A Command Prompt window opens when the batch file is executed. Is
>>> >> > there a
>>> >> > way to close the Command Prompt window before the programs
>>> >> > complete?
>>> >>
>>> >>
>>>
>>>
>>>

>
>


Reply With Quote

 
Old 06-30-2009, 07:40 PM