Invoking MainBoss Service from a Command Line
This help file applies to an out-of-date version of MainBoss.
The most recent version of MainBoss is MainBoss 4.2.2.
For the latest version of this help file can be found here.
< Previous section | Table of Contents | Index | Next section >
You may find it convenient to invoke MainBoss Service from a command line in a Command Prompt window—it may be simpler to test and/or create the service from a command line than from inside MainBoss itself. Invoking MainBoss Service from a command line also lets you automate certain actions in batch files and command scripts; some organizations find that this is a good fit with other standard procedures. Finally, you may be running a server on a computer that doesn't have a graphic user interface, in which case a command line interface is necessary.
In order to run MainBoss Service on a computer without a graphic user interface, use XCOPY to copy the entire MainBoss program file directory to the desired computer.
To invoke MainBoss Service from a command line, open a Command Prompt window and CD to the Windows folder that contains the MainBoss software. (You specify this folder when you install MainBoss.) The MainBoss Service software is stored in a file named
To start the service running, you use a command line of the form
Thinkage.MainBoss.Service option option option ...
Options may have any of the following forms:
- Specifies a value. For example, /ServicePassword:password specifies a password.
- Turns on an option. For example, +TestConfiguration tells to test the current MainBoss Service configuration.
- Turns off an option.
Option Abbreviations: Option keywords on the MainBoss Service command line may be abbreviated. In this guide and other MainBoss documentation, the letters that must be included are shown in upper case; any or all other letters may be omitted. For example, the following are all valid abbreviations for the option /DatabaseName
Although the documentation shows some letters in upper case and some in lower, you can type letters in any case you want. For example, /DBN is exactly the same as /dbn or /Dbn when used on the command line.
Available Options: The following options may be used on the MainBoss Service command line.
- The database server where the MainBoss database is hosted.
- The name of the database containing the MainBoss data on the database server.
MainBoss Service obtains configuration information from a specific MainBoss database. For most operations, you must specify /DatabaseServer and /DatabaseName so that MainBoss Service can locate the database and find the required information.
- The name of the service. By default, this is MainBossService.
- Specifies a SQL Server connection string if necessary.
- Used when the version of MainBoss Service that is currently running is different from the Thinkage.MainBoss.Service.exe that you want to use. Typically, you only need to specify a version if you are updating an older version of MainBoss Service to match a new release of MainBoss.
- Used when the service should use Windows Authentication to access the MainBoss database. The /ServiceUsername and /ServicePassword give the name and password for the Windows login name that MainBoss Service should use.
- The login name for the service to run under. The default is Network Service, so normally, this option doesn't need to be supplied.
- The password for the login name under which the service runs. This is only needed if the service doesn't run under Network Service.
- Used when the service should use a SQL name-and-password to access the MainBoss database. The /SQLUsername and /SQLPassword options give the name and password that MainBoss Service should use.
- A SQL Server name that MainBoss Service should use when accessing the MainBoss database. This option should only be used in conjunction with /Authentication: SQLPassword.
- A password that MainBoss Service should use when accessing the MainBoss database. This option should only be used in conjunction with /Authentication: SQLPassword.
- Runs the MainBoss Service software to test the configuration information stored in the associated MainBoss database. This doesn't attempt to perform any actual processing; it just tests the validity of the configuration information and produces any appropriate diagnostic messages.
If you already have a version of MainBoss Service running, diagnostic messages issued by that MainBoss Service may duplicate the ones produced by running the software with /TestConfiguration.
- Runs the MainBoss Service software as a normal application program rather than as a Windows service. This is the next step beyond /TestConfiguration: it doesn't just test the configuration information, it actually attempts to do a single round of processing incoming requests and outgoing acknowledgements. Once it finishes this processing, the software terminates.
If you already have a version of MainBoss Service running, diagnostic messages issued by that MainBoss Service may duplicate the ones produced by running the software with /ManuallyRun.
- Creates a Windows Service that runs MainBoss Service. You need Windows Administration privileges to make this work. The command line should specify /DatabaseServer and /DatabaseName so that the software can find configuration information for the service. The options /ServiceUsername and /ServicePassword may also be needed if you don't want to execute the service under Network Service. Finally, you must specify /ServiceName if you don't want to use the default name of MainBossService.
- Deletes an existing copy of MainBoss Service that is currently running as a Windows service. You need Windows Administration privileges to make this work. If you have multiple services running, use /ServiceName:name to specify which service you want to delete.
- Requires SQL Server Administrator privileges on the SQL Server that manages the MainBoss database. If you have those privileges, /GrantAccess sets up SQL Server permissions so that the login name specified by /ServiceUsername can access the MainBoss database. The /GrantAccess command line should include the options /ServiceUsername, /DatabaseServer and /DatabaseName.
- Forces an action to take place, even if errors or other conditions would normally prevent the action from happening. This is sometimes necessary if the computer where the service should be running is no longer available.
- Updates an older version of MainBoss Service. This is equivalent to deleting the existing service and creating a new one, using the software in Thinkage.MainBoss.Service.exe.
- Lists all the MainBoss Services currently running as services on the current computer.
Notes: Using the command line interface to MainBoss Service is the only way to install it under any other login name but Network Service. This interface also lets you install MainBoss Service to run on a computer where MainBoss itself is not installed. However, even if MainBoss itself is not on the computer, the software for MainBoss Service must be on the computer.
< Previous section | Table of Contents | Index | Next section >