startprog.opt

Package: WA2L/WinTools 1.2.09
Section: Configuration Files (4)
Updated: 27 March 2026
Index Return to Main Contents

 

NAME

startprog.opt - configuration file for startprog

 

SYNOPSIS

WA2LWinTools/lib/startprog.opt

WA2LWinTools/lib/command.opt

 

AVAILABILITY

WA2L/WinTools

 

DESCRIPTION

This is the configuration file for the renamed variants of the startprog command.

The option file must have the same name as the related command variant (e.g.: command.opt).

 

FILEFORMAT

Rows starting with # are considered as comments.

The file format is OPTION=VALUE

Between the OPTION, the = and the VALUE are no spaces.

You can comment out any OPTION or completely remove the related setting line to use the default settings.

 

OPTIONS

VERBOSE
verbose output of the startprog command variant.

Example: VERBOSE=True

Default: VERBOSE=False

DISABLESTATS
if set to True disable command startup statistics collection. This option exists to avoid double recording when the started command already performs a statistics collection.

Example: DISABLESTATS=True

Default: DISABLESTATS=False

TYPE
type of the command to be started indirectly thru the startprog command variant.

Possible settings are: EXEC, SYSTEM, JAVA@EXEC and JAVA@SYSTEM.

EXEC starts the command as a dedicated detached process. Therefore the EXEC type is often less suitable for commands also used on the command line.

SYSTEM starts the command and waits for it's completion. This type is often more suitable for commands also used on the command line. The SHOWWINDOW setting has only significance when the command is not started from the command line.

The JAVA@... types load the JAVA_PATH=path;path;path... from the optional etc/java.cfg configuration file to allow to define additional locations of the java.exe and javaw.exe command (COMMAND="%INSTALLDIR%\lib\java.cmd" and COMMAND="%INSTALLDIR%\lib\javaw.cmd") on the system.

Note: in pre 4.0.17 versions the SYSTEM type caused to use the system() call internally to start the process. Now for the EXEC and SYSTEM type the CreateProcess() for *.exe commands and ShellExecuteEx() call for other commands (*.bat, *.cmd) is used.

Example: TYPE=SYSTEM

Default: TYPE=EXEC

SHOWWINDOW
when set to True the configured command (COMMAND="command") is started in a window, when set to False the command is started completely in the background.

Be aware that depending on the started command sometimes even when SHOWWINDOW=False is set, a console window pops up. In that case try using the TYPE=EXEC setting.

Example: SHOWWINDOW=False

Default: SHOWWINDOW=True

PATH
Prepend the system %PATH% to find additional command- and dll-files needed by the command defined in COMMAND= and PREEXEC= settings.

In the PATH setting the environment variables %USERNAME%, %USERPROFILE%, %ProgramFiles%, %ProgramFiles(x86)%, %windir%, %APPDATA%, %LOCALAPPDATA%, %INSTALLDIR%, %INSTALLDRIVE% and %ARCHITECTURE% can be used.

Where the %INSTALLDIR% variable contains the installation base directory of the WA2L/WinTools package, %INSTALLDRIVE% the drive letter (without colon) and the %ARCHITECTURE% is set to 32 on a 32-bit and to 64 on a 64-bit operating system.

Example: PATH=%INSTALLDIR%\lib;%INSTALLDIR%\lib\7zip

Default: PATH=

PREEXEC
Command (with options, if needed) to be executed prior to the command defined in the COMMAND="command" setting.

This might be useful to do some preparations prior to the command execution.

The PREEXEC setting format is: PREEXEC="command" [ options ]

The command to be started must be defined as an absolute path. To do so portably, variables (as: %INSTALLDIR%) can be used.

Note: in pre 4.0.17 versions the command defined in PREEXEC caused to use the system() call internally to start the process. Now CreateProcess() for *.exe commands and ShellExecuteEx() call for other commands (*.bat, *.cmd) is used.

Example: PREEXEC="%INSTALLDIR%\lib\WScheduler.cmd"

Default: PREEXEC=

COMMAND
a command to be started thru the startprog command variant.

The command to be started must be defined as an absolute path. To do so portably, variables (as: %INSTALLDIR%) can be used.

In the COMMAND="command" setting the same environment variables as in PATH=... can be used.

Example: COMMAND="%INSTALLDIR%\lib\Notepad2.exe"

Default: COMMAND=

OPTIONS
options to the COMMAND="command" settings, that are not provided thru the command line.

In the OPTIONS=... setting the same environment variables as in PATH=... can be used.

Example: OPTIONS=/o0 /f "%INSTALLDIR%\etc\Notepad2.cfg"

Default: OPTIONS=

WORKINGDIR
set specific working directory on startup.

Example: WORKINGDIR=%INSTALLDIR%\lib\folderspopup

Default: WORKINGDIR=

ESCAPEOPTIONS
escape options specified on command line.

In pre 4.0.17 versions of startprog.exe this setting was needed on TYPE=SYSTEM when command line options contained special characters, as: (, ) and & had to be computed and a *.bat or *.cmd command is specified in the COMMAND="command" setting.

Now this setting was not needed in any lib/command.opt file of the WA2L/WinTools package.

Example: ESCAPEOPTIONS=True

Default: ESCAPEOPTIONS=False

VERSION
Version of started COMMAND to be displayed by the -V command line option (VERSIONOPT).

Example: VERSION=0.8.15

Default: VERSION=

AUTHOR
Author of started COMMAND to be displayed by the -V command line option (VERSIONOPT).

Example: AUTHOR=John Doe

Default: AUTHOR=

HELPOPT
Command line option to be used to display the usage message.

If HELPOPT is set empty, startprog will not display a usage message when invoking the -h option and passes that option to the command defined in the COMMAND setting. The usage display can then be handled by the started COMMAND.

Example: HELPOPT=

Example: HELPOPT=--help

Default: HELPOPT=-h

INSTALLOPT
Command line option to be used to install the COMMAND to the 'SendTo' or 'Autostart' menu.

If INSTALLOPT is set empty, startprog will not handle the installation and the option is also not listed when displaying the usage message after invoking the HELPOPT command line option.

Example: INSTALLOPT=

Example: INSTALLOPT=--install

Default: INSTALLOPT=-i

UNINSTALLOPT
Command line option to be used to remove the COMMAND from the 'SendTo' or 'Autostart' menu.

If UNINSTALLOPT is set empty, startprog will not handle the de-installation and the option is also not listed when displaying the usage message after invoking the HELPOPT command line option.

Example: UNINSTALLOPT=

Example: UNINSTALLOPT=--uninstall

Default: UNINSTALLOPT=-u

VERSIONOPT
Command line option to be used to display the version and author information defined in the VERSION and AUTHOR setting.

If VERSIONOPT is set empty, startprog will not handle the version display and the option is also not listed when displaying the usage message after invoking the HELPOPT command line option.

Example: VERSIONOPT=

Example: VERSIONOPT=--version

Default: VERSIONOPT=-V

MOREOPTIONS
additional options of the usage message. Multiple MOREOPTIONS=text lines are allowed.

Example: MOREOPTIONS=

Example: MOREOPTIONS=options

Default: MOREOPTIONS=[ options ]

MOREOPTDESC
description of the additional options in the usage output. Multiple MOREOPTDESC=text lines are allowed.

Example: MOREOPTDESC=

Example: MOREOPTDESC=-l list definitions

Default: MOREOPTDESC=[ options ] additional options

SHORTCUTLOC
Location where the shortcut that is created in when using the INSTALLOPT command line option.

When SHORTCUTLOC is set to SENDTO the COMMAND can be used thru the 'SendTo' menu.

If set to STARTUP it is installed to the 'Autostart' menu and the COMMAND will be executed 'On Login'.

If set to DESKTOP it is installed on the user's 'Desktop'.

Example: SHORTCUTLOC=STARTUP

Default: SHORTCUTLOC=SENDTO

SHORTCUTNAME
Prefix name of the 'SendTo' shortcut.

This prefix is seen in the 'SendTo' menu when SHORTCUTLOC=SENDTO is defined.

Example: SHORTCUTNAME= vi

Default: SHORTCUTDESC=command

SHORTCUTDESC
Description text of the shortcut.

This text is seen in the 'SendTo' menu when SHORTCUTLOC=SENDTO is defined.

Example: SHORTCUTDESC=enhanced Notepad

Default: SHORTCUTDESC=

SHORTCUTOPTS
Additional options for the shortcut.

In the SHORTCUTOPTS setting the same environment variables as in PATH= can be used.

Example: SHORTCUTOPTS=--verbose

Default: SHORTCUTOPTS=

SHORTCUTDIR
Set a specific start directory in the shortcut.

In the SHORTCUTDIR setting the same environment variables as in PATH= can be used.

Caution: do *not* set quotes ( " ) around directories (even if there are spaces in a directory) and do *not* define a backslash ( \ ) at the end of a directory path.

Example: SHORTCUTDIR=%INSTALLDIR%\lib

Default: SHORTCUTDIR=

SHORTCUTMODE
Display mode of the command started thru the shortcut: 1: normal window, 3: maximized window, 7: minimized window.

Example: SHORTCUTMODE=1

Default: SHORTCUTMODE=7

 

EXAMPLES

1) example .opt file to start Notepad2 from bin/np.exe

#
# lib/np.opt - startprog options for: Notepad2
#
# [00] 01.07.2017 CWa   Initial Version
#

VERBOSE=False
COMMAND="%INSTALLDIR%\lib\Notepad2.exe"
OPTIONS=/o0 /f "%INSTALLDIR%\etc\Notepad2.cfg" +

VERSION=4.2.25
AUTHOR=Florian Balmer

 

SEE ALSO

wintoolsintro(1), java.cfg(4), property(1), startprog(3)

 

NOTES

since startprog version 4.0.17 (25.03.2026):

-
the setting HIDECONSOLE is ignored. The appearance of the (console)-window is now controlled by the SHOWWINDOW setting alone.

-
all TYPE=type settings different to EXEC result in starting it as TYPE=SYSTEM. Therefore the legacy TYPEs SYS, SHELL and EXECSHELL are "mapped" to SYSTEM.

-
all TYPE=JAVA@type settings different to JAVA@EXEC result in starting it as TYPE=JAVA@SYSTEM. Therefore the legacy TYPEs JAVA@SYS, JAVA@SHELL and JAVA@EXECSHELL are "mapped" to JAVA@SYSTEM.

 

BUGS

This configuration file is case- and format-sensitive, therefore all settings need to be specified as documented here to be computed correctly. See example command.opt files in the lib/ directory.

 

AUTHOR

startprog.opt was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2023 Christian Walther

This is free software; see WA2LWinTools/man/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
FILEFORMAT
OPTIONS
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 18:57:55 GMT, April 12, 2026