# Install WATCHER and SLABAPCLI

WATCHER is a program that watches for ABAP changes and reports them to SeaLights. SLABAPCLI is a command-line interface program that lets you configure the ABAP Agent and connect it to SeaLights. You can install these on a Windows server or a standalone machine.

The ZIP file: <https://agents.sealights.co/slabap/latest/slabapagent-win64.zip>.

{% hint style="info" %}
Note: Install the WATCHER and SLAPABCLI programs to a system-wide accessible directory (for example, c:\apps), and not to a directory with restricted accessibility (for example, c:\users\<username>).
{% endhint %}

1. Create a new directory named `c:\apps\SLABAPAgent`. We call this the `SLABAPAgent` directory.
2. Create a directory named `<SLABAPAgent dir>\config`.
3. Navigate to the directory where you extracted the distribution ZIP file.
4. Extract the `slabapagent-win64\bin` directory from the ZIP file to the `<SLABAPAgent dir>\bin` directory.
5. Download the latest version of the SAP NW RFC SDK from the [SAP ONE Support Launchpad](https://accounts.sap.com/saml2/idp/sso), and extract the files to a temporary directory. You will need the following:

   * NetWeaver RFC SDK 7.50 Patch 13 or above for Windows on X64 64Bit.
     * See SAP NOTE 2573790 for download links. <https://launchpad.support.sap.com/#/notes/2573790>

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>If you are unable to download the SDK, your account may not have the required permissions on the SAP ONE Support Launchpad. Contact your SAP platform administrator for assistance.</p></div>

   <figure><img src="https://4057366433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAjqTCMRYvHhDgsdPLUnc%2Fuploads%2FDAsgbg5sv6hbRoHUMswI%2Fimage.png?alt=media&#x26;token=31edc171-cfa6-4035-9a9f-a7163e44a907" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://4057366433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAjqTCMRYvHhDgsdPLUnc%2Fuploads%2F35PBfXKOfrzjHfUf6O2K%2Fimage.png?alt=media&#x26;token=c2fbc188-6242-4e7e-9d1a-8f3bb4b7d534" alt=""><figcaption></figcaption></figure>
6. Copy the following files from the `<Temp SAP NW RFC>\lib` directory to the `<SLABAPAgent dir>\bin` directory:

* `icudt57.dll`
* `icuin57.dll`
* `icuuc57.dll`
* `libsapucum.dll`
* `sapnwrfc.dll`

### Log Files <a href="#toc201668083" id="toc201668083"></a>

> **Note:** Ensure that the installation directory allows write permissions.\
> Missing write access to `userdata` or `bin\logs` may cause SLABAPCLI commands to fail silently.

The ABAP Agent stores log files for the `WATCHER` program in the following directories:

* `<SLABAPAgent dir>\userdata\public\Logs\<Pipeline name>`
* `<SLABAPAgent dir>\bin\logs`

To purge log files older than 14 days, start Windows PowerShell as an Administrator, and run the following from the `<SLABAPAgent dir>\bin` directory:

{% code title="Command" overflow="wrap" %}

```powershell
.\purgeLogs.exe
```

{% endcode %}

{% code title="Expected output" overflow="wrap" lineNumbers="true" %}

```powershell
PS C:\apps\SLABAPAgent\bin> .\purgeLogs.exe 
[2025-09-16 08:57:09.405+01:00] [info] Starting log purge operation 
[2025-09-16 08:57:09.405+01:00] [info] Purging logs older than 14 day(s) and 00:00:00 in the '..\userData\public\Logs' and 'C:\apps\SLABAPAgent\bin\logs' directories 
[2025-09-16 08:57:09.410+01:00] [debug] Trying to remove directory '..\userData\public\Logs\HH_SLABAPCLI_150925' if empty. 
[2025-09-16 08:57:09.411+01:00] [info] Log purge operation completed 
```

{% endcode %}
