> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnilinker.pl/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the Omnilinker Station app

> Install the Station app on the PC next to the printer, pair it with Omnilinker, and update or remove it later.

This page is for the person who sets up the PC. The Omnilinker Station app is one installation package with two parts:

* **The Windows service** (`Omnilinker.Station.Service.exe`). It stays connected to Omnilinker, takes print jobs and
  sends them to the printers. It runs as Local System, so it keeps printing when nobody is signed in.
* **The tray app** (`tray\Omnilinker.Station.Tray.exe`). It shows the station's state next to the clock, and is where
  you pair the PC and where people at the desk pause printing or fix a printer. It runs as the person who is signed in.

Setup does the whole installation: it registers and starts the service, prepares the data folder, and makes the tray
app start for everyone who signs in. There is nothing to configure during setup: the station's name, its printers and
what they print are set in Omnilinker.

## Before you begin

* **A station in Omnilinker and its pairing code.** An administrator adds the station in **Devices** > **Stations** and
  gets a 6-character code that works for 10 minutes. See [Add a station](/devices/stations#add-a-station). You can
  install the app first and pair later.
* **The PC**: Windows 10 or 11, 64-bit, next to the printers it will print on.
* **The printers installed in Windows for all users of the PC.** The service runs as Local System and cannot see a
  printer that was added for one Windows user only, such as a network printer connected from one person's profile.
* **Network**: the PC must reach `https://omnilinker.pl` on port 443. If your company uses a proxy, you can enter it
  after installation; see [Network and proxy](#network-and-proxy).
* **A local administrator account**, and a PowerShell window started **as Administrator**.

## Get the installer

In the **Add a station** dialog, **Download for Windows** downloads the installer. **Copy a link to open on that PC**
copies the download link, so you can open it on the station's PC.

## Install the app

<Steps>
  <Step title="Run setup for all users">
    Open PowerShell **as Administrator** in the folder that contains the installer, and run it with these options.
    Replace `<installer>` with the installer's file name:

    ```powershell theme={null}
    .\<installer>.exe --silent --installto "C:\Program Files\Omnilinker\Station"
    ```

    Setup installs the app to `C:\Program Files\Omnilinker\Station\current`. The tray app is in its `tray` subfolder.

    <Warning>
      Do not double-click the installer. Without `--installto`, it installs into your own user profile. The service runs
      as Local System, so setup refuses to register it from a folder that a signed-in person can change: anyone who
      could replace its files could run code as SYSTEM. The files are copied, but there is no service and nothing
      prints.
    </Warning>
  </Step>

  <Step title="Let setup register the app">
    Setup then does the following by itself:

    | What                | Details                                                                                                                                                                                              |
    | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Windows service     | Name `OmnilinkerStation`, display name **Omnilinker Station**, description "Prints labels and documents sent from Omnilinker on this PC's printers."                                                 |
    | Startup type        | Automatic.                                                                                                                                                                                           |
    | Log on as           | Local System.                                                                                                                                                                                        |
    | Recovery            | Restart after 5 seconds, then 10 seconds, then every 30 seconds. The failure count resets after one day. This also applies when the service stops with an error, which is how an update restarts it. |
    | Data folder         | Creates `%ProgramData%\Omnilinker\Station`. Only SYSTEM and administrators can change it; other users can only read it, for example the log files. See [Local files](#local-files).                  |
    | Operators group     | Creates the local group **Omnilinker Station Operators** and adds you to it. See [Who can change the app](#who-can-change-the-app).                                                                  |
    | Tray app at sign-in | Adds `OmnilinkerStationTray` under `HKLM\Software\Microsoft\Windows\CurrentVersion\Run`, so the tray app starts for everyone who signs in to this PC.                                                |

    Finally, setup starts the service. The service starts the tray app for everyone who is signed in, and the pairing
    window opens.

    If a service called `OmnilinkerStation` already exists, setup updates its program path and startup type and keeps
    its other settings.
  </Step>

  <Step title="Check the result">
    ```powershell theme={null}
    Get-Service OmnilinkerStation
    ```

    `Status` should be `Running`.

    Setup does not stop when one of its steps fails. It writes what it could not do to
    `%ProgramData%\Omnilinker\Station\logs\setup.log`, one line per problem. A successful run writes `done`.

    ```powershell theme={null}
    Get-Content "$env:ProgramData\Omnilinker\Station\logs\setup.log" -Tail 20
    ```

    To fix a problem, run the same setup command again from PowerShell as Administrator. Every step can run again
    safely.
  </Step>
</Steps>

The Station app and the [ERP Sync agent](/erp/install-agent) can run on the same PC. They use their own service, folder
and operators group.

## Pair the PC with Omnilinker

Pairing links this PC to one station of your company. You type a code instead of copying a password or an API key.

<Steps>
  <Step title="Open the pairing window">
    After installation, **Connect this PC to Omnilinker** opens by itself. If you closed it, click the Omnilinker
    Station icon next to the clock: it says "Not connected yet: click to connect this PC".
  </Step>

  <Step title="Type the code">
    Type the code from Omnilinker in **Pairing code**. You can paste the whole code. **Where's the code?** explains
    where to find it: **Devices** > **Stations** > **Add station**.
  </Step>

  <Step title="Check who the PC will print for">
    The app shows "Code accepted. This PC will print for:" with the **Company**, **Station**, **Location** and who added
    it (**Added by**), and how many printers it found. If this is not your company, click **Cancel** and check where
    the code came from.
  </Step>

  <Step title="Connect">
    Click **Connect this PC**. The app shows that the station is connected and lists the printers on the PC. Click
    **Continue in Omnilinker** to finish in the browser: choose what each printer prints and send a test label. See
    [Add a station](/devices/stations#add-a-station).
  </Step>
</Steps>

If the code does not work:

| Message                                               | What to do                                                                                            |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| "This code has expired."                              | Codes work for 10 minutes. Click **Get a new code** in Omnilinker and type the new one.               |
| "This code isn't right."                              | Check it letter by letter. Codes never use 0, O, 1 or I.                                              |
| "This code was already used."                         | Each code connects one PC. Get a new code in Omnilinker.                                              |
| "This PC is already connected."                       | Only an operator of this PC can pair it again; see [Who can change the app](#who-can-change-the-app). |
| "Too many tries. Wait a few minutes, then try again." | Omnilinker accepts at most 10 pairing attempts a minute from one IP address.                          |

### How the station signs in

When the PC is paired, Omnilinker creates an account for that station alone and gives the app its key. The account
has only the **Station app (service accounts only)** permissions, in the role **Station Agent**, and can act for this
one station only. The key is stored encrypted in the data folder, which only SYSTEM and administrators can open; it is
never shown to anyone.

* **Pair again with a new code** in the station's settings gives the PC a new key and stops the old one.
* Removing the station in Omnilinker stops its key at once. See [Remove a station](/devices/stations#remove-a-station).

## Who can change the app

Anyone signed in to the PC can open the tray app, see the printers, pause and resume printing, reprint the last
label, send a test label and run **Troubleshoot**. See [Use the Station app](/devices/station-app).

Pairing an already paired PC again, changing the proxy, and disconnecting the PC need more. Only these people can do
them:

* members of the local group **Omnilinker Station Operators**,
* administrators whose tray app runs elevated (**Run as administrator**).

Anyone else sees "Only an administrator of this PC can do that." Setup adds the person who installed the app to the
group. To add someone else, run in PowerShell as Administrator:

```powershell theme={null}
net localgroup "Omnilinker Station Operators" "<DOMAIN\user>" /add
```

The change takes effect straight away. You can also manage the group in **Computer Management** > **Local Users and
Groups** > **Groups**.

## Network and proxy

The app connects out to Omnilinker over HTTPS; nothing connects in to the PC. When the connection drops, the app tries
again every 30 seconds, and jobs wait in Omnilinker until it is back.

If your company network needs a proxy, open the tray app's **Settings** (right-click the icon) and choose **Proxy**
under **Connection**: **Use Windows settings** (the default), **None**, or **Manual…** with an address such as
`proxy.company.local:8080`. The next connection uses it. Changing the proxy needs an operator.

## Local files

| What                        | Where                                                                                                                              |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Install folder              | `C:\Program Files\Omnilinker\Station\current` (replaced on every update)                                                           |
| Encrypted key               | `%ProgramData%\Omnilinker\Station\credentials.dat`                                                                                 |
| Jobs this PC is printing    | `%ProgramData%\Omnilinker\Station\jobs.db`, kept 7 days. It lets the app tell after a restart whether a label was already printed. |
| Proxy setting               | `%ProgramData%\Omnilinker\Station\settings.json`                                                                                   |
| Service logs                | `%ProgramData%\Omnilinker\Station\logs\station-<date>.log`, one file a day, up to 20 MB each, the last 14 kept                     |
| Setup log                   | `%ProgramData%\Omnilinker\Station\logs\setup.log`                                                                                  |
| Tray preferences and errors | `%LocalAppData%\Omnilinker\Station\tray.json` and `tray-errors.log`, for each Windows user                                         |

**Open logs folder** in the tray app's **Settings** opens the service logs.

## Update the app

The app updates itself. The service looks for a new version 5 minutes after it starts and then every 4 hours. When it
finds one, it downloads it straight away and installs it at night, between 01:00 and 05:00 local time, and never while
a label is on its way to the printer. It then stops, and Windows starts the new version a few seconds later. Afterwards the
tray app shows "Updated overnight to …".

To install a downloaded update now, open the tray app's **Settings** and click **Install now** under **Updates**. It
installs as soon as nothing is printing. **Check now** looks for a new version straight away.

An update runs the same steps as setup, so the service, the operators group and the tray app at sign-in stay in place.
The pairing, the jobs file and the logs are kept: they are outside the install folder.

To update by hand, run the new version's installer with the same command as for the first installation, from
PowerShell as Administrator.

## Remove the app

<Steps>
  <Step title="Disconnect the PC (recommended)">
    In the tray app, open **Settings** and click **Disconnect…** under **Disconnect**, then **Disconnect**. Omnilinker
    is told straight away, and jobs on their way to this PC go back to Omnilinker. You need to be an operator.

    You can also remove the station in Omnilinker instead; see [Remove a station](/devices/stations#remove-a-station).
  </Step>

  <Step title="Uninstall the app">
    Signed in as the administrator who installed the app, open **Settings** > **Apps** > **Installed apps** (on Windows
    10: **Apps & features**) and uninstall **Omnilinker Station**.

    Uninstalling stops and removes the Windows service, removes the tray app from sign-in, and deletes the install
    folder. Problems are written to `setup.log`, as during installation.
  </Step>

  <Step title="Delete local data (optional)">
    Uninstalling keeps `%ProgramData%\Omnilinker\Station`, with the key, the jobs file and the logs, for support. The key
    no longer works once the station is removed in Omnilinker. Delete the folder, as an administrator, if you are not
    reinstalling the app on this PC. Each person's `%LocalAppData%\Omnilinker\Station` folder can go too.
  </Step>

  <Step title="Remove the operators group (optional)">
    Uninstalling keeps the **Omnilinker Station Operators** group. To remove it, run in PowerShell as Administrator:

    ```powershell theme={null}
    net localgroup "Omnilinker Station Operators" /delete
    ```
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="No service after installation">
    `Get-Service OmnilinkerStation` finds nothing. The installer was probably started without `--installto`, for
    example by double-clicking it, so it installed into a user profile. Check `setup.log`: it says "Install for all
    users". Uninstall that copy in **Installed apps**, then [install the app](#install-the-app) again from PowerShell
    as Administrator.
  </Accordion>

  <Accordion title="“The Omnilinker Station service is not running”">
    The tray app cannot reach the service. Restart the PC. If it stays like this, start the service in PowerShell as
    Administrator with `Start-Service OmnilinkerStation`, then check the service logs.
  </Accordion>

  <Accordion title="A printer is missing">
    Install the printer in Windows (**Settings** > **Printers & scanners**), for all users of
    the PC. It appears in Omnilinker within a minute. The **Printers the app can see** check in **Troubleshoot** shows
    whether the app sees it.
  </Accordion>

  <Accordion title="The station stays Offline in Omnilinker">
    Open **Troubleshoot** in the tray app. If "Omnilinker is blocked on this network" appears, other websites work but
    Omnilinker does not answer: a firewall, antivirus or company proxy is usually the cause. Allow `omnilinker.pl` on
    port 443, or set the proxy in [Network and proxy](#network-and-proxy).
  </Accordion>

  <Accordion title="“Only an administrator of this PC can do that.”">
    Pairing again, the proxy and disconnecting need an operator. Add the person to **Omnilinker Station Operators**; see
    [Who can change the app](#who-can-change-the-app).
  </Accordion>

  <Accordion title="“This PC is no longer connected”">
    The station was removed in Omnilinker. Ask an administrator to pair it again (**Pair again** under **Removed**
    stations, or a new station), then type the new code. If the PC will not print for Omnilinker any more,
    [remove the app](#remove-the-app).
  </Accordion>
</AccordionGroup>

For the printer problems people meet at the desk, such as paper out or a label that did not print, see
[Use the Station app](/devices/station-app).
