Installing a sensor as a service

If you use Windows services, you can install the OpenText ScanCentral SAST sensor as a Windows service.

To install the sensor as a Windows service:

  1. Before running setupworkerservice.bat , ensure to either:

    1. Copy the ScanCentral client files into the OpenText SAST installation folder,
      or

    2. Set the SAST_LOCATION environment variable to specify the OpenText SAST installation folder.

  2. Go to the <sc_sast_install_dir>\bin\scancentral-worker-service directory, and then do one of the following:

    For information about how to encrypt a shared secret, see Encrypting the Shared Secret on a Sensor.

    • To use a plain text password, run the following command:
       

      setupworkerservice.bat <sast_version> <controller_url> <shared_secret>
    • To use an encrypted password, run the following command:
       

      setupworkerservice.bat <sast_version> <controller_url> "<encrypted_shared_secret>" <path_to_pwtool.keys_file>

      Enclose <encrypted_shared_secret> in quotes. This ensures that the encrypted shared secret does not get corrupted when the services installer creates the worker.properties file.

      where <sast_version> is the <year>.<quarter> portion of the OpenText SAST version (for example, 25.2).

      The setupworkerservice command does not correctly handle worker_auth_token tokens that contain the caret character (^). If you must use the caret character as a part of a worker_auth_token, use the following formula:

      saved_caret_count = carets_used_on_command_line / 8

      Examples:

      For a worker_auth_token that contains a single caret, such as this^that, run the following command:

      setupworkerservice.bat 25.2 https://url.com this^^^^^^^^that

      For a worker_auth_token that contains two caret characters, such as this^^that, run the following command:

      setupworkerservice.bat 25.2 https://url.com this^^^^^^^^^^^^^^^^that
  3. Start the service, as follows:

    net start FortifyScanCentralWorkerService

The services installer creates the <sast_install_dir>\Core\config\worker.properties file for you.

See Next

Enabling Sensor Auto-Start on Windows as a Service

See also

Installing Sensors