Install-Win32Service

Use this command to install a service or device for Windows. The installation of devices is not recommended. After running, the computer may need to be restarted.


Settings:

The easiest way to fill in the following settings is to select the service in question under Service Name using the Browse button. The corresponding values will then be entered automatically. Afterwards you only have to enter the values for the login and thus avoid incorrect entries.

  • Service name
    The name of the service in the service database. The Browse button allows you to take any service (available on the packaging system) from the service database. All related information is also transferred, so that the fields of the dialog are filled automatically. The service database is located in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.
  • Display name
    The descriptive name of the service. This name is displayed in the Services dialog in the Control Panel, for example.
  • Module name
    Full path and file name of the executable file associated with the service.
  • Load ordering group
    Services can be grouped together. A list of available service groups can be found in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder.
  • Depends on (groups)
    The operability of a service may depend on a service group. This means that this service will only run if at least one member of the group is running after an attempt to start all services of the group.
  • Depends on (services)
    The operability of one service may depend on another service. This means that this service only runs when the service on which it depends is already running.
  • Service type
    A bit pattern that specifies the type of service. Possible values are:

    • SERVICE_KERNEL_DRIVER
    • 2
      SERVICE_FILE_SYSTEM_DRIVER
    • 4
      SERVICE_ADAPTER
    • 8
      SERVICE_RECOGNIZER_DRIVER
    • 16
      SERVICE_WIN32_OWN_PROCESS
    • 32
      SERVICE_WIN32_SHARE_PROCESS

If you specify either 16 or 32, and the service runs under the Local System account, you can specify the following additional value by adding it: 256 (SERVICE_INTERACTIVE_PROCESS). Example: 16+256=272

  • Error Control
    Specifies the behaviour in case of an error during the service start phase.
  • Start Type
    To change the way the service starts, select one of the following options:
    • Automatic
      Starts the service automatically at system startup after the services of the startup type "Boot" and "System".
    • System
      Starts the service on system startup after the services of the "Boot" startup type.
    • Manual
      Allows a user or a dependent service to start the service.
    • Disabled
      Prevents a user from starting the service. However, it can be started by the system.
    • Boot
      Starts the service when the computer is turned on.
    • Automatic (delayed)
      Automatically starts the service at system startup 120 seconds after the last service with startup type "Automatic" was started.
  • Login
    Specifies whether the service logs in using the system account or a user account.
    • System account
      Specifies that the service logs on using the Local System Account.
      • Allow interactive relation to the desktop
        Only valid for services running under the system account. Determines whether the service displays a user interface on the desktop that can be used by any user who is logged on when the service starts.
    • This Account
      Allows you to assign a specific user account to a service. The specification is made according to the syntax Domäne\UserID
    • Password and password confirmation
      The password for the user account must be entered twice. Note that passwords are case-sensitive.
  • Start service after successful installation
    This will start the service immediately after installation. Using the Start-Win32Service command is then superfluous.


Example:

Installs and starts the DSM Runtime Service.


Corresponds to DSM eScript command:

  • InstallService


See also: