run.cfg

Package: WA2L/WinTools 1.2.08
Section: File Formats (4)
Updated: 01 February 2024
Index Return to Main Contents

 

NAME

run.cfg - application run definitions

 

SYNOPSIS

etc/run.hostname.cfg

etc/run.domainname.cfg

etc/run.cfg

 

AVAILABILITY

WA2L/WinTools

 

DESCRIPTION

This is the application start map file for the run command.

The configuration file(s) are read in the sequence: run.hostname.cfg -> run.domainname.cfg -> run.cfg when existing. The hostname is replaced by the %COMPUTERNAME% and domainname is replaced by the %USERDOMAIN% environment variable.

 

FILEFORMAT

Rows starting with a # are considered as comments.

APPLICATION;EXECUTABLE;OPTIONS;DESCRIPTION;

It is allowed to have multiple entries with the identical APPLICATION name. In this case the run command starts the first EXECUTABLE found. Doing this it is possible to start different versions of an application depending on availability on the related system always thru the same run APPLICATION call.

Where:

APPLICATION
Name of the application as you like to call it.

The APPLICATION field entry can be a comma separated list representing aliases of the same application:

  Firefox,FF;FirefoxPortable\FirefoxPortable.exe;-private-window;

where the FirefoxPortable.exe can be started either calling run Firefox or run FF .

When calling run application the case of application does not need to match to the entry in the APPLICATION field.

When calling run -i application the shortcut on the 'Desktop' is precisely created as defined in the APPLICATION field (in upper-/lower-case as specified).
 

EXECUTABLE
executable definition as in appstart(1).

The run command supports to start executables with the suffixes .exe, .cmd and .bat.

To start executables with the suffixes .jar, .vbs, .ps1 or .lua an APPLICATION with the name run.suffix has to be defined in run.cfg to locate the related interpreter and to set the desired default options for it as for example:

  #
  # run.cfg - configuration file for run.exe 
  #
  # [00] 20.07.2018 CWa Initial Version
  #
  APPLICATION;EXECUTABLE;OPTIONS;DESCRIPTION;
  run.jar;bin\javaw.exe;-jar;start .jar from run;
  run.lua;lib\lua.exe;;start .lua from run;
  run.ps1;c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe;-executionpolicy bypass -File;start .ps1 from run;
  run.vbs;c:\Windows\system32\cscript.exe;//Nologo;start .vbs from run;

When specifying executables with other suffixes, then system wide file associations apply to load/start the related executable file.

The same (environment)variables as in the OPTIONS column can also be used in the EXECUTABLE column.

OPTIONS
options to be passed to the executable defined in EXECUTABLE.

The following time and date related variables can also be used in the OPTIONS column:

(The date used in the examples is February 26th, 1986 14:59:31)

%YEAR%
four digit year of today (e.g.: 1986).

%MONTH%
two digit month of today (e.g.: 02).

%DAY%
two digit day of month of today (e.g.: 26).

%HOUR%
two digit hour of time (e.g.: 14).

%MIN%
two digit minutes of time (e.g.: 59).

%SEC%
two digit seconds of time (e.g.: 31).

%YDAY%
three digit day number of the year (e.g.: 057).

%WDAY%
one digit day of week number, 0 represents Sunday (e.g.: 3).

The following (environment)variables can also be used in the OPTIONS column:

%COMPUTERNAME%
name of the computer.

%USERDOMAIN%
domain name of the computer.

%USERNAME%
user name of the logged on user.

%USERPROFILE%
path to the user's profile folder.
Defaults to: C:\Users\%USERNAME%

%ProgramFiles%
this environment variable points to Program Files directory, which stores all the installed program of Windows™ and others.
Defaults to: C:\Program Files

%ProgramFiles(x86)%
this environment variable points to Program Files directory, which stores all the installed program of Windows™ and others.
Defaults to: C:\Program Files (x86)

%ProgramW6432%
this environment variable also points to C:\Program Files directory.

%SystemDrive%
its value is the drive upon which the system folder was placed. The default value of %SystemDrive% environment variable is in most cases C:.

%TEMP%
this environment variable points to the default temporary folder that is used by the operating system and applications available to the currently logged on user. Some applications require %TEMP% and others require %TMP%, the values should be identical.
Defaults to: C:\Users\%USERNAME%\AppData\Locale\Temp

%TMP%
see: %TEMP%.

%APPDATA%
this environment variable points to the base location of where applications should store their data by default. It is up to the author as to what the application should store here, or if they choose to use this folder at all. This is a subdirectory of the user's profile folder.
Defaults to: C:\Users\%USERNAME%\AppData\Roaming

%INSTALLDIR%
installation directory of the WA2L/WinTools package.
Example: D:\programs\WA2LWinTools

%INSTALLDRIVE%
installation drive letter (without :) of the WA2L/WinTools package.
Example: D

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

%SEMICOLON%
this variable is replaced with ;.

DESCRIPTION
Free text description of the application.

The DESCRIPTION field is optional.

 

EXAMPLES

#
# run.cfg - configuration file for run.exe 
#
# [00] 20.07.2018 CWa Initial Version
#
APPLICATION;EXECUTABLE;OPTIONS;DESCRIPTION;
Excel;Microsoft Office\Office14\excel.exe;;Spreadsheet;
Excel;Microsoft Office\Office16\excel.exe;;Spreadsheet;
GIMP;GIMPPortable\GIMPPortable.exe;;Photo Editor;
Firefox,FF;FirefoxPortable\FirefoxPortable.exe;-private-window;Web Browser;
XMind;XMindPortable\XMind 8 Update 1\XMind.exe;;Mind Mapping;
Gnuplot;Octave\octave-4.2.1\bin\wgnuplot.exe;;Math. Plotting; 
Writer;OfficePortable\Writer.exe;;Text Editor;

 

SEE ALSO

wintoolsintro(1), appstart(1), appstart.cfg(4), run(1), http://environmentvariables.org/Category:Microsoft_Windows

 

NOTES

When using (environment) variables you can check your definitions using the command

  [ h:\bin\WA2LWinTools\etc ]
  [ fred@ACME007 ][*wtshell*/cmd]: ..\lib\cfgcat -f run.cfg

or

  [ h:\bin\WA2LWinTools\lib ]
  [ fred@ACME007 ][*wtshell*/cmd]: run -l | cfgcat -f - 

to expand the variables.

 

BUGS

-

 

AUTHOR

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

 

COPYRIGHT

Copyright © 2020 Christian Walther

This is free software; see WA2LWinTools/doc/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
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

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