appstart "subdir\executable" [ options ]
appstart "label:\dir\executable" [ options ]
appstart -p "subdir\executable"
appstart -p "label:\dir\executable"
Please read also the run(1) manual page.
The run command allows to save the "subdir\executable" or "label:\dir\executable" and options definitions in a central configuration file and start the related application thru an application name.
search a program that is installed in a specific subdirectory in a list of directories and start it from where it is found first.
This permits to install a program on several devices (as: USB-drive or local-drive etc.) and to start it from the (fastest) available drive without to have to change the startup shortcut or the start definition in pstart(1) or the hotkey setup in hotkeyp(1).
The search path can be specified in the optional configuration file etc/appstart.cfg using the SEARCHPATH=path1;path2;pathN... setting. The additional environment variables %INSTALLDIR% that points to the installation directory and %INSTALLDRIVE% that points to the installation drive of WA2L/WinTools can be used in the SEARCHPATH setting.
The appstart command searches for the given label on all connected drives and starts the defined executable within the absolute path you defined in dir.
For example:
appstart myUSB-Stick:\Programs\GIMPPortable\GIMPPortable.exe
would search for a directory myUSB-Stick or the disk name myUSB-Stick on all connected drives and then uses the found drive letter to start the command.
If the label myUSB-Stick is found on drive P: for example, appstart starts the executable as follows:
P:\Programs\GIMPPortable\GIMPPortable.exe
In this mode the setting SEARCHPATH= is ignored.
A label can be a directory placed on the target disk or the disk name that can be set thru Explorer → right mouse-click on drive letter → General tab → Disk-Icon: name → [ OK ].
The dir\executable is the absolute path to the executable (eg.GIMPPortable.exe) without the drive letter.
This allows to start an executable for instance from an USB device whose drive letter changes on different systems or when changing your USB-hub configuration always thru the same startup command:
appstart myUSB-Stick:\Programs\GIMPPortable\GIMPPortable.exe
Where you created the directory myUSB-Stick in the topmost location on the USB stick. You can also hide the created directory.
This environment variable then can be used in started *.cmd or *.bat files to react accordingly based on the start situation.
Suppose you installed the WA2L/WinTools package on a removable drive in the e:\bin\ directory (where the drive name e: might change on other systems or when plugging it into another USB port).
All portable software is also installed on the removable drive in the bin/ directory, each in it's own subdirectory.
To increase performance, you installed (=copied) certain applications in addition from the removable drive to your user home into the 'my Documents\bin\' directory (which is in reality: c:\users\Fred\Documents\bin\ respectively %USERPROFILE%\Documents\bin\).
To start the applications you use the portable start menu pstart(1) which is bundled with WA2L/WinTools.
To avoid to have to create separate icons for the local and the portable installed programs you can use the appstart command as in the following examples:
GIMP (Gnu Image ManiPulator):
Application / file path: appstart.exe Command line parameters: GIMPPortable\GIMPPortable.exe Advanced > Window state: minimized
Gnuplot (Mathematical function plotting):
Application / file path: appstart.exe Command line parameters: Octave\octave-4.2.1\bin\wgnuplot.exe Advanced > Window state: minimized
Now when you are working on the PC where you copied the applications to the 'my Documents\bin\' directory or when you just have the removable device available, you can always click the same icon.
When you decide to change the installation directories of the software you just have to change the SEARCHPATH setting in the appstart.cfg(4) file, all the startup settings in PStart can stay the same.
You might notice that you see the >> icon of appstart in PStart for the created entries in the menu. To change this you can set an icon for each command:
To use an icon (*.ico) file:
Advanced > Replace icon: ..\var\icons\Gnuplot.ico
To extract an *.ico file from an executable, the icongrabber(1) command can be used.
To start the applications you use the portable hotkey manager hotkeyp(1) which is bundled with WA2L/WinTools.
To avoid to have to create separate hotkeys for the local and the portable installed programs you can use the appstart command as in the following examples:
GIMP (Gnu Image ManiPulator):
Command: appstart.exe Parameters: GIMPPortable\GIMPPortable.exe Window: minimized
Gnuplot (Mathematical function plotting):
Command: appstart.exe Parameters: Octave\octave-4.2.1\bin\wgnuplot.exe Window: minimized
Now when you are working on the PC where you copied the applications to the 'my Documents\bin\' directory or when you just have the removable device available, you can always use the same hotkey.
When you decide to change the installation directories of the software you just have to change the SEARCHPATH setting in the appstart.cfg(4) file, all the hotkey settings in HotkeyP can stay the same.
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.