startprog

Package: WA2L/WinTools 1.2.08
Section: Library Commands (3)
Updated: 08 April 2021
Index Return to Main Contents

 

NAME

startprog - start batch commands or executables thru an *.exe file

 

SYNOPSIS

WA2LWinTools/lib/startprog

WA2LWinTools/bin/command [ startprog_options | command_options ]

startprog_options ::= [ -h ][ -i ][ -u ][ -V ]

Hint: the startprog_options can be individually enabled/disabled/changed using the command.opt file. See: startprog.opt(4) for more information.

 

AVAILABILITY

WA2L/WinTools

 

DESCRIPTION

startprog(3) indirectly starts commands or executables.

This to provide/show an *.exe file to the end user independent of the command implementation.

For each command to be started, create a copy of the lib/startprog.exe command file with the desired command name in the bin/ directory of WA2L/WinTools.

 

OPTIONS

command_options
command line options to be passed to the target command.

startprog_options
This options enable some functions that are used to handle the started command.

-h
display usage.

-i
create shortcut in 'Send To' menu or 'Startup' menu depending on the SHORTCUTLOC setting in the command.opt file.

-u
remove shortcut from 'Send To' menu or 'Startup' menu depending on the SHORTCUTLOC setting in the command.opt file.

-V
print command version and author based on the settings VERSION and AUTHOR in the command.opt file.

The startprog_options can be individually enabled/disabled/changed using the command.opt file to avoid clashes with options provided by the command. See: startprog.opt(4) for more information.

 

ENVIRONMENT

The following environment variables are computed by the startprog command to be used in the option file command.opt :

See also: startprog.opt(4) for more information where the (environment) variables can be used.

%APPDATA%
path to user application data.

%LOCALAPPDATA%
path to local user application data.

%COMPUTERNAME%
host name.

%ProgramFiles%
path to 32Bit software installed in Windows™.

%ProgramFiles(x86)%
path to 64Bit software installed in Windows™.

%TEMP%
temporary directory.

%TMP%
temporary directory.

%USERDOMAIN%
domain name.

%USERNAME%
user name.

%USERPROFILE%
path to user profile.

The following variables are computed by the startprog command to be used in the option file command.opt :

%INSTALLDIR%
installation base directory of the WA2L/WinTools package.

%INSTALLDRIVE%
installation drive letter (without colon) of the WA2L/WinTools package.

%ARCHITECTURE%
Operating system type: 32 for a 32-bit and 64 for a 64-bit operating system.

The following environment variables are added to the environment by the startprog command and are therefore available within the started commands:

%WA2L_START_FROM_TTY%
this variable is set to True when the startprog command was started from a command window (aka. tty), when started thru a double click directly or via 'Send To' menu the variable is set to False.

This environment variable then can be used in started *.cmd or *.bat files to react accordingly based on the start situation.

%WA2L_INSTALLDIR%
installation base directory of the WA2L/WinTools package.

 

EXIT STATUS

x
return status of started type SYSTEM command.

2
shortcut in 'Send To' or 'Startup' menu could not be removed when using -u from the startprog_options.

4
usage message displayed when using -h from the startprog_options.

5
version message displayed when using -V from the startprog_options.

 

FILES

bin/command.exe
command variant of lib/startprog.exe to be used to start the target command thru an *.exe file.

lib/command.opt
option file of target command to be read by bin/command.exe . See: startprog.opt(4) for more information.

lib/startprog.exe
command to create a copy from in bin/.

%APPDATA%/Microsoft/Windows/SendTo/
directory that holds all shortcuts from the 'Send To' menu in Microsoft Windows™ Explorer.

%APPDATA%/Microsoft/Windows/Start Menu/Programs/Startup/
directory holding all shortcuts to programs that are started automatically when you log in to Microsoft Windows™.

%USERPROFILE%/Desktop/
directory representing the user's desktop.

var/db/counter/command
statistics file for the called command. The var/db/counter/command file is a binary file that contains the time stamps of each command start.

If the var/db/counter/ directory does not exist no command start statistics are recorded.

To print a statistics table of all conducted command starts, use the progstats(1) command. To print a list of time stamps for a command, use the lib/timestampslist command.

To record time stamps to a var/db/counter/command file from a script that is not started thru startprog use the lib/timestampsrecord command.

 

EXAMPLES

-

 

SEE ALSO

wintoolsintro(1), config(1m), progstats(1), run(1), startprog.opt(4)

 

NOTES

-

 

BUGS

-

 

AUTHOR

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

 

COPYRIGHT

Copyright © 2020 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
OPTIONS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 16:33:03 GMT, September 14, 2024