Portability and Portability and Environmental Variables

Top  Previous  Next

You can use the following environmental variables in paths to make your configuration file more portable:

 

%WinDir% - for example C:\Windows
%SystemDirectory% - for example C:\Windows\System32
%MyDocuments% - for example D:\My Documents
%ProgramFiles% - for example C:\Program Files
%StartMenu%
%Favorites%
%APPDRIVE% -- drive where LBC has been run from (call like %APPDRIVE%\subpath)
%APPDIR% -- directory where LBC has been run from (call like %APPDIR%\subpath)

 

Note that when adding folder nodes you can select these special folders to list from the drop down menu.  The strings above are for use in adding Command nodes.

 

For example you might add a notepad command to: %SystemDirectory%\notepad.exe

 


Using LaunchBar Commander on removable usb drives:

 

LaunchBar Commander is designed to be usable on removable drives, like usb pen drives, etc.

 

If it can't find the file/command/folder specified at the exact location configured, it will look for it on the same drive as the program is running from.  In this way you don't have to do anything special, just ensure that the programs are in the same locations on the drive when you move the configuration file.

 

Alternatively, you can use %APPDIR% to refer to the base directory of the LaunchBarCommander.exe itself.  So you can refer to files to be launched relative to the LaunchBarCommander.exe program itself.