Create Service on the Local PC

Create and manage system services using Application as Service:


Create system service using graphical interface:

1. Click "Create" button on Toolbar and select "Create on localhost" option:

img

2. "Create service" dialog will be invoked:

img

3. Now choose one of the following options:

  • Create service from application – The main benefit of this option is that you can supply your application with advanced features: choose the user session to start the service in, schedule the service launch, manage its pop-up windows, log error streams, and many others. This option is preferred if you want to run as service an application with UI.
  • Create system service – In contrast to the first option, "Create system service" option provides fewer possibilities for running application as service. The service control and management in this case will be carried out by the system. Choose this option if you want your service take less CPU resources when running.

    Please, take into account that to work correctly, your application should satisfy the requirements of the service control manager (SCM). You can find more info on Service Programs at http://msdn.microsoft.com/en-us/library/ms685967%28v=VS.85%29.aspx

4. Click "Browse" button to select the service application to install.

5. Enable "Interaction with desktop" option if you want your application’s UI be visible. Otherwise, your application will run in the background.

6. Configure service parameters using different tabs. Full description of tabs is available in Configuration Tabs section.

7. Once all the available settings are configured, click "Create service" button.

8. Once successfully created, your new service will appear in Services list:

img

9. If you haven’t specified "Automatic" startup type in Service tab (the default value is "Manual"), the service won’t be started until you do it intentionally. To start the service, select it in Services list and press "Start" button on Toolbar. Once the service is started, its status will change to "running".
 


Now you can manage services using Toolbar buttons:

img

  • Start locally – start the service currently selected in Services list.
  • Stop locally – stop the service currently selected in Services list.
  • Edit locally – invoke "Edit service" dialog for the service currently selected in Services list.
  • Delete locally – remove the service currently selected in Services list.
  • Copy – copy the service currently selected in Services list to the remote computer.
     

Create system service from command line

  • Install the service by typing the full path to app2srv.exe file (by default it is "C:\Program Files\Eltima Software\Application as Service\", or add this path to Path environment variable), INSTALL and providing all necessary command line options. For instance:

c:\Program Files\Eltima Software\Application as Service\app2srv.exe INSTALL /SN="system_1" /PM="C:\notepad.exe" /WD="C:" /SRV1

  • SN (Service Name) and PM (Executable file) parameters are mandatory. Note that your application will run in the background unless you provide the /ID1 parameter ("Interaction with desktop" enabled).
  • Start the service by typing the full path to the app2srv.exe file, START and valid SN (Service Name) key. For instance:

c:\Program Files\Eltima Software\Application as Service\app2srv.exe START /SN="system_1"

 


Create system service using XML configuration file

  • Click "Create" button on Toolbar and select "Import from XML…" option:

img

Select your XML configuration file and click "Open" button. Once the service is successfully created, you will see your service in "Eltima services" section of Services list.

  • The second way to create new system service is to install the service by typing the full path to app2srv.exe file (by default it is "C:\Program Files\Eltima Software\Application as Service\", or add this path to Path environment variable), INSTALLXML command and providing the full path to your XML_FILE. For instance:

c:\Program Files\Eltima Software\Application as Service\app2srv.exe INSTALLXML c:\Work\App2srv_config.xml

Start the service by typing the full path to the app2srv.exe file, START and valid SN (Service Name) key. For instance:

c:\Program Files\Eltima Software\Application as Service\app2srv.exe START /SN=Notepad