Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

I start a program from my script and it hogs my command window

19 views
Skip to first unread message

Timo Salmi

unread,
Dec 17, 2003, 3:30:39 AM12/17/03
to
DRAFT:

36} I start a program from my script and it hogs my command window.

Occasionally one may want to call a program from the command line
window. Furthermore, it sometimes is useful to build calling that
program into a script e.g. for customization. However, when one
does, the command window will "freeze" to wait for the completion of
the task. How can one avoid that and free the command window for
other parallel usages? The trick is to start the program using the
START.EXE command.

As an example, my favorite text editor is the SemWare Editor
Professional. Below is one of the options of how I may call it. It
is a batch/script that is meant to work on both my 95 and my XP PC.
This means that in Windows95 it must not have to encounter for it
unknown (CMD.EXE) lines of the batch/script.

@echo off
:: E.BAT by Prof. Timo Salmi
:: One option for calling the SemWare Editor Professional
::
if "%OS%"=="Windows_NT" goto _nt
if "%1"=="" L:\TSEPro\e32.exe *.*
if not "%1"=="" L:\TSEPro\e32.exe %1 %2 %3 %4 %5 %6 %7
goto _out
::
:_nt
if "%1"=="" (
start "" "C:\Program Files\TSEPro\e32.exe" *.*
) else (
start "" "C:\Program Files\TSEPro\e32.exe" %1 %2 %3 %4 %5 %6 %7)
::
:_out

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Useful script files and tricks ftp://garbo.uwasa.fi/pc/link/tscmd.zip

Gary Smith

unread,
Dec 20, 2003, 11:49:19 PM12/20/03
to
Timo Salmi <t...@uwasa.fi> wrote:

> Occasionally one may want to call a program from the command line
> window. Furthermore, it sometimes is useful to build calling that
> program into a script e.g. for customization. However, when one
> does, the command window will "freeze" to wait for the completion of
> the task. How can one avoid that and free the command window for
> other parallel usages? The trick is to start the program using the
> START.EXE command.

In Win NT/2K/XP, the START command is internal to CMD.EXE rather than
being a standalone program. Thus ".EXE" should be deleted from the
paragraph above and batch files intended to be run in both 9X and NT-type
environments must be careful not to specify the extension.

--
Gary L. Smith gls...@yahoo.com
Columbus, Ohio

Timo Salmi

unread,
Dec 21, 2003, 2:26:19 AM12/21/03
to
Gary Smith <bitb...@example.com> wrote:
> Timo Salmi <t...@uwasa.fi> wrote:
> > Occasionally one may want to call a program from the command line
> > window. Furthermore, it sometimes is useful to build calling that

> In Win NT/2K/XP, the START command is internal to CMD.EXE rather than

> being a standalone program. Thus ".EXE" should be deleted from the
> paragraph above and batch files intended to be run in both 9X and NT-type
> environments must be careful not to specify the extension.

Thank you Gary. I am adding a Google pointer to your posting.

0 new messages