donphiltrodt-ga:
In order to have a batch file call another program, then complete the
rest of its commands before that other program has completed, you have
two options that are supported by all versions of Windows since
Windows 95. The two options are: 1) use the 'start' command in your
batch file directly; 2) create a Windows shortcut (*.lnk) file, and
call that from your batch file.
START COMMAND
-------------
The START command method is the easiest; simply add the command START
in front of the program name in your current batch file, and you're
done. So, if your current Batch File contains the line:
FancyProgram.exe
you would change it to:
START FancyProgram.exe
and you're done.
WINDOWS SHORTCUT FILE
---------------------
The second way to accomplish the same thing is to use a Windows
Shortcut File. That way, the Shortcut will get called by the batch
file, start up the intended program in its own session, then return
control of the original command processor session to the batch file so
that it can end.
First, create FancyProgram.lnk by simply creating a Windows shortcut
to FancyProgram.exe in Windows (right-click on FancyProgram.exe in
Windows Explorer, then select 'Create Shortcut'). You can place this
shortcut anywhere you like, but probably best to put it where
FancyProgram.exe itself resides.
Next, edit your batch file so that instead of calling
FancyProgram.exe, you call FancyProgram.lnk instead.
That's all.
when you run the batch file, it will either take over the active
command processor session (if you are calling it from a command
prompt), or start up a command processor session. It will process all
of the commands leading up to the line with FancyProgram.lnk. When it
gets to that line, it will call FancyProgram.lnk, and pass control
over the current, active command processor session to it.
FancyProgram.lnk, in turn, will start up FancyProgram.exe in a new
session. Once it has done this, it will terminate itself, returning
control over the original command processor session to your batch
file. FancyProgram.exe, in the meanwhile, will still be running in its
separate session.
MORE BATCH FILE INFO
--------------------
For further information on how to squeeze more utility out of batch
files in Windows operating systems, check out the following useful
websites:
Rob van der Woude's Scripting Pages (click on 'batch files' on the left-hand menu)
http://www.robvanderwoude.com/index.html
Computing.Net Batch File Help
http://www.computerhope.com/batch.htm
Ahuka.com DOS Lesson 17:Batch FIle Variables
http://www.ahuka.com/dos/lesson17.html
- variables are great for designing/using nested batch files, you can
create an entire nested menu system using them.
I hope this helps!
aht-ga
Google Answers Researcher
Search Strategy
---------------
personal knowledge developed since before the days of MS-DOS 3.3
batch files .bat call
://www.google.com/search?q=batch+files+.bat+call |