How to enable application services in a Container (Service)

Save to PDF

Applies to: Cloudhouse Containers

25/05/2019 Cliff Hobbs


The Auto Packager does not configure support for services automatically. When packaging an application that includes a service, a run action must be configured in a <Run Condition> within the Container's Programs.xml file. 

Step-by-step process

To configure the <Run Condition>:

  1. In the Container's folder, open the AppAcceleratorV.clc file.
  2. Add the Service feature:

  3. Open Programs.xml
  4. Add a new <Program> entry, adjusting the arguments to point to the executable.
  5. Set the <RunCondition> as Always.

    <Program ProgramOrder="1">
      <Args>/f %DefaultDir%\ProgData\Service.exe</Args>

The following service APIs are hooked:

  • StartServiceCtrlDispatcherA
  • StartServiceCtrlDispatcherW
  • SetServiceStatus
  • OpenSCManagerA
  • OpenSCManagerW
  • OpenServiceA
  • OpenServiceW
  • CloseServiceHandle
  • StartServiceA
  • StartServiceW
  • QueryServiceConfigA
  • QueryServiceConfigW
  • RegisterServiceCtrlHandlerA
  • RegisterServiceCtrlHandlerW
  • RegisterServiceCtrlHandlerExA
  • RegisterServiceCtrlHandlerExW
  • QueryServiceStatus
  • QueryServiceStatusEx
  • ControlService
  • GetServiceDisplayNameA
  • GetServiceDisplayNameW

Was this article helpful?

Table of Contents

    Can't find what you're looking for?

    Contact Support