Command Line Parameters

Top  Previous  Next

The command line is a text string that is passed to the system whenever any program is executed; it contains the path to the program followed by a set of parameters. In Windows, you can start a program using the Start Menu "Run..." command or by clicking on a Shortcut on the Desktop or in the Start menu. If you start a program by clicking a Shortcut, you can edit the command line for the program in Shortcut Properties' "Target" input box.


For The Bat!, the Command Line in a Shortcut usually looks like this:


"C:\Program Files\The Bat!\TheBat.EXE"


You can add some start-up parameters to it to define a set of actions performed whenever you open the Shortcut. For example, if the Shortcut is located in the Windows Startup folder, you may want to switch off the The Bat! startup Logo by adding the /NOLOGO parameter, so the "Target" property of the shortcut becomes something like this:


"C:\Program Files\The Bat!\TheBat.EXE" /NOLOGO


We have implemented a set of Command Line parameters (we call them commands) that help you to perform actions within The Bat! without having to do so manually, making it is possible to use The Bat! from batch files or other programs as an e-mail transport without having to know details of Internet mailing and to perform scheduled tasks automatically (for example, checking for new mail at a particular time and then exiting so The Bat! would not use your system's resources for too long a time).


Note that you can run only one copy of The Bat! on your PC at one time, but if you try to start another copy of The Bat!, all Command Line parameters will be seamlessly passed to the running copy of the program and executed.


For those who are familiar with programming, here's a handy hint: The Bat! checks a file called TheBat.IPC which is located in the same directory in which The Bat! executable (TheBat.exe) file is located. Within this text file, each line represents one command that can be executed by the program, so you can write commands to this file directly and control The Bat! on your PC even over a local network. Note that TheBat.IPC is deleted as soon as all commands from it have been executed, so if this file does not exist, you will have to create it to make use of it.


To ensure that a copy of The Bat! is running on a computer, a program that needs to interact with The Bat! must check whether a mutex called "The Bat! is owned by a process and, if it is not, The Bat! has to be started.