You can set up an existing UTM application as a Windows service so that the application is started automatically when the computer is booted and terminated automatically when the computer is shut down. You install and deinstall a service by calling the utmmains
program. utmmains
is a component of openUTM and is located in utmpath\ex
.
Installing a UTM service
To install a UTM application as a service you must sign on to Windows system under a user ID with administration rights and open a command prompt window with Start - Programs - Command Prompt.
Call utmmains
with the following parameters in this command prompt window:
utmmains
[ -d
] install
servicename filebase [ startparam-file [ user]]
The parameters must be separated by commas, and the parameters mean the following:
-d
Diagnostics information is also output to stdout; optional.
install
Specifies that utmmains
installs a service.
servicename
Variable name part of the service; required parameter. The complete name of the service is then openUTM
servicename. It is recommended to use the application name from the KDCDEF statement MAX APPLINAME as the servicename.
filebase
Fully qualified base name of the UTM application; required parameter.
The base name is the name of the directory in which the application program and KDCFILE are located.
startparam-file
Fully qualified name of the start parameter file.
Default: Startp.std
user
Account name for the application run. You can specify a local user or a domain user here. The name must have the following syntax:
For a local user account: .\
LocalUser
For a domain user account: DomainName\DomainUser
Default: system account
If you specify a user here, then you must enter the corresponding password when configuring the service (see below).
utmmains
sets up the service immediately. You will need to configure the service after that.
Configuring the UTM service
As an administrator you can specify the startup type and the properties of the login account. Proceed as follows to do this:
Open the Control Panel window by clicking on Start - Control Panel.
Click on Administrative Tools and than on Services. This opens a window with a list of all services available on the computer.
Highlight the desired service; UTM services always have the prefix
openUTM
. The Status column displays if the service has been started or not.Click on the Startup Type button. This opens an additional window in which you can specify the following:
The startup type (Manual/Automatic/Disabled)
The account under which the service is signed on. If you already specified a user when installing the service (User parameter), then it is displayed here. In this case you must enter the corresponding password here, otherwise you will not be able to start the service.
If a utility program such as KDCKAA.exe cannot access the resources (e.g. shared memory) of the UTM application, it may be because different accounts are involved. If so, you should configure the service so that it signs on with the same account data as the user who starts the utility program.Click on OK and exit the Control Panel.
Deinstalling a UTM service
To deinstall a UTM service, sign on under a user ID with administration privileges, open a Command Prompt window and call utmmains
with the following parameters:
utmmains
[ -d
] remove
servicename
The parameters mean the following:
d
Diagnostics information is also output to stdout; optional.
remove
Specifies that utmmains
deinstalls a service.
servicename
Variable name part of the service.
Example
You want to set up the application SAMple01
as a service and sign on to the system account. The KDCFILE, start parameter file and application program can be found in the directory C:\utmserv
. The start parameter file is named startparameter
.
To install the service, call
utmmains
as follows:utmmains install Sample C:\utmserv C:\utmserv\startparameter
If on Windows you now click on Start - Control Panel - Administrative Tools - Services and page down, then you will see a screen like the one in the following figure:
Click on General and configure the service in the following window:
For example, here you can switch to Automatic for the Startuptype mode.
Please note the following: If you select startup type Automatic then the UTM application is not permanently terminated until you terminate this service, see section "Terminating a service on Windows systems".
Click on Log On ... and configure the service in the following window:
Here you can specify a different account for This Account in Log on as instead of the system account.
To deinstall the service, call
utmmains
as follows:utmmains remove Sample