Invoking MainBoss Service from a Command Line

< 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

Thinkage.MainBoss.Service.exe

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:

/keyword:value
Specifies a value. For example, /ServicePassword:password specifies a password.
+Option
Turns on an option. For example, +TestConfiguration tells to test the current MainBoss Service configuration.
-Option
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

/databasename
/dbname
/dn

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.

/DatabaseServer:name
The database server where the MainBoss database is hosted.
/DatabaseName:name
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.

/ServiceName:name
The name of the service. By default, this is MainBossService.
/ServiceComputer:name
The name of the computer on which MainBoss Service is running (or on which you intend to start it running). This option is only necessary if MainBoss Service is running on a different computer than the one you're using to run Thinkage.MainBoss.Service.exe.
/Version:identifier
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.
/ServiceUsername:name
The login name for the service to run under. The default is Network Service, so normally, this option doesn't need to be supplied.
/ServicePassword:password
The password for the login name under which the service runs. This is only needed if the service doesn't run under Network Service.
+TestConfiguration
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.
+ManuallyRun
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.
+DetailedHelp
May be used when you have a copy of MainBoss Service running as a service. You will be given information about the service that is running (e.g. the login name under which it is running).
+CreateService
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.
+DELeteService
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.
+GrantAccess
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.
+Force
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.
+Update
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.
+ListMainBossServices
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 >