![]()
StartW (35K zip file) is useful for starting applications from Windows shortcuts. Instead of creating separate batch files to set or clear environment variables, you can define them inside the shortcut. I use StartW in the Games folder I have set up for my children. I can use this to keep them from accidentally launching the same game multiple times, using the unless option.
StartW [ unless (WindowName|WindowClass) | with NAME=value | without NAME ]* program args...]
StartW starts a program, with the specified arguments. You can define new environment variables for the
program with the 'with' keyword, or remove (undefine) variables with the 'without' keyword.
If you specify one or more 'unless' options, the program is not started if an application wih the WindowName or
WindowClass is already running. Instead, the already running progrm is restored and brought to the foreground instead.
This is very useful for shortcuts for games for young children, who tend to double click on icons for games which
are already running.
For example:
StartW -unless "Some Game Title" SomeGame.exe /opt1 /opt2
Starts a program named SomeGame.exe with the options /opt1 /opt2
unless there is already a program with the window title "Some Game Title" already running.
StartW with CLASSPATH=c:\Java\MyClasses\myclasses.jar;%CLASSPATH% java MyMain
Starts the program named java with the argument MyMain, after setting the
CLASSPATH environment variable to
c:\Java\MyClasses\myclasses.jar;%CLASSPATH%
You can specify as many with, without, and unless arguments as you want, but each one requires a keyword, such
as:
StartW with PATH=C:\MyApp;%PATH% with LIB=%LIB%;C:\MyApp\Lib with TZ=EST without FFLIB MyProgram
StartW is distributed with the full source code under the GNU General Public License.
Copyright © 2000 David J. Biesack
biesack@mindspring.com
http://David.Biesack.home.mindspring.com
![]()