Installation Guide : EMSRV for Windows : Starting EMSRV as a Windows service
Starting EMSRV as a Windows service
The following steps cover how to install EMSRV as a Windows service. See Troubleshooting EMSRV as a Windows service for a listing of common problems and solutions when running EMSRV as a Windows service.
1. Change directory to the directory containing the EMSRV executable (as specified previously in Setting up EMSRV for Windows).
2. Enter emsrv -install <parameters>. The optional <parameters> are EMSRV parameters such as -u <user name>, -p <password>, and so on. (For a list of available parameters, see EMSRV Startup options.) These parameters are fixed and will be used every time EMSRV is started as a service.
Ensure that -install is the first parameter. This installs EMSRV as a service in the registry and copies the necessary DLLs to the system directory. If there is an older version of EMSRV already installed, it removes the older version and installs the new version.
When installing EMSRV as a service, use "triple double-quotes" around arguments that contains spaces or special characters except for the password (-p). Passwords with spaces or special characters should be enclosed within “single double-quotes”.

For example, if emsrv is started from the command line with:
emsrv -u vaadmin -p "joe bob" -W "C:\Program Files\Instantiations\VA Smalltalk\10.2\manager"
then it can be installed as a service with:
emsrv -u vaadmin -p "joe bob" -W """C:\Program Files\Instantiations\VA Smalltalk\10.2\manager"""
In order to start EMSRV as a service, the directory into which the log file is written must be writeable by the EMSRV user. The –W command line parameter specifies the log file.
3. Start EMSRV as a service by using one of the following methods:
a. Starting EMSRV as a service using the Services control panel
1. Open the Control Panel and double-click the Administrative Tools icon and then the Services icon.
2. Select the EMSRV Service in the Services control panel.
3. Select HW Profiles and verify that a configuration is enabled. Enable one if necessary.
4. Select Start and EMSRV will start as a service. (Selecting Stop will stop the service and close all connections.)
b. Starting EMSRV as a service using the Service Controller utility sc.exe
1. Enter sc start EMSRV -u <user name> -p <password> at a DOS command prompt.
2. Query the service status by entering sc query EMSRV.
3. To stop the service, enter sc stop EMSRV.
c. Starting EMSRV automatically at Windows startup:
1. Go to the Services control panel.
2. Select EMSRV and press the Startup button.
3. Select Automatic for the startup type.
To remove the EMSRV Service from the registry, enter EMSRV -remove at a DOS command prompt. Alternatively, you can remove it by entering sc delete EMSRV.
The -remove option will stop the service if it is running as well as delete it from the registry.
Guidelines for running EMSRV as a Windows service
Following are some guidelines for running EMSRV as a Windows service:
The EMSRV service does not need to interact with the Desktop.
Error messages about startup and low disk space are written to the Windows Event Log.
The stop command will stop the service, closing all active connections without warning.
Parameters entered at the Services control panel are ignored. Enter all parameters when installing with the -install option.
Last modified date: 05/15/2020