- The Windows service (
Omnilinker.ErpSync.Service.exe). It reads your ERP database and sends changes to Omnilinker. It runs as Local System. - The tray app (
tray\Omnilinker.ErpSync.Tray.exe). You use it to configure the agent and watch what it is doing. It runs as the person who is signed in.
Before you begin
- Create the connection in Omnilinker and copy its agent API key. See Create a connection.
- Check the machine against the requirements.
- You need a local administrator account, and a PowerShell window started as Administrator.
- Decide who will configure the agent from the tray app. Setup gives you that right. Other people need to be added to a local group. See Who can change the agent.
Install the agent
1
Run setup for all users
Open PowerShell as Administrator in the folder that contains the installer, and run it with these options.
Replace Setup installs the agent to
<installer> with the installer’s file name:C:\Program Files\Omnilinker\ErpSync\current. This is the install folder. It
contains the service, appsettings.json, and the tray app in its own tray subfolder.2
Let setup register the agent
Setup then does the following by itself:
Finally, setup starts the service. The service starts the tray app for everyone who is signed in, and the
setup wizard opens.If a service called
OmnilinkerErpSyncService already exists, for example from an earlier version, setup
updates its program path and startup type and keeps its other settings, including its Log On account.3
Check the result
Status should be Running.Setup does not stop when one of its steps fails. It writes what it could not do to
%ProgramData%\Omnilinker\ErpSync\logs\setup.log, one line per problem. A successful run writes done.Who can change the agent
Anyone signed in to the agent computer can open the tray app and see the agent’s status, logs and settings. The password and API key are never shown. Changing the agent needs more. Only these people can save settings, run the setup wizard, test the database connection, enable or disable change tracking, pause syncing, and pause or cancel a hash check from the tray app:- members of the local group Omnilinker ERP Sync Operators,
- administrators whose tray app runs elevated (Run as administrator).
Next step
Complete the setup wizard. It opens by itself after installation. If it does not, start the tray app from thetray subfolder of the install folder.
Update the agent
The agent 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, when no sync is running. It then stops, and Windows starts the new version a few seconds later. 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 tray app closes while its files are replaced. The service starts it again for everyone who is signed in. What an update keeps and replaces:- Your credentials, queue and logs are kept. They are stored outside the install folder.
appsettings.jsonin the install folder is replaced by the new version’s file. Set the values you change as machine environment variables instead. See Change a setting.
AutoUpdateEnabled to false. See
Updates. The tray app has no update button.
To update by hand, run the new version’s installer with the same command as for the first installation, from
PowerShell as Administrator.
Upgrade from an earlier version
Earlier versions installed into the installing person’s profile and neededinstall-service.ps1 to register the
service. Some installations also changed the service’s Log On account. To move such an installation to the
current model:
1
Let the queue empty
Check that no events are waiting to be sent:
pending should be 0 in the tray app’s status window or in
GET /api/sync/outbox/stats on the local API. The queue is not moved to the new installation.2
Remove the old service and app
Exit the tray app. In PowerShell as Administrator, run
uninstall-service.ps1 from the old install folder. Then,
signed in as the account that installed the old version, uninstall it in Settings > Apps >
Installed apps.3
Install the new version
Follow Install the agent.
4
Check the configuration
If the old service ran as Local System, the new service moves its saved configuration to the new data folder
on first start, and the setup wizard does not open. If the old service ran under another account, its
configuration stays in that account’s profile. Complete the setup wizard again.After that you can delete the old data folder,
%LocalAppData%\Omnilinker\ErpSync of the account the old service
ran as.Remove the agent
1
Uninstall the app
Signed in as the administrator who installed the agent, open Settings > Apps > Installed apps (on
Windows 10: Apps & features) and uninstall Omnilinker ERP Sync.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.2
Delete local data (optional)
Uninstalling keeps the agent’s data, for support and in case you reinstall:
%ProgramData%\Omnilinker\ErpSync: the encrypted credentials and the log files.C:\Windows\System32\config\systemprofile\AppData\Local\Omnilinker\ErpSync: the local queue and the cached configuration.
3
Remove the operators group (optional)
Uninstalling keeps the Omnilinker ERP Sync Operators group. To remove it, run in PowerShell as Administrator:
Portable copy (ZIP)
The package also shipsinstall-service.ps1 and uninstall-service.ps1, for a copy unpacked from a ZIP file
instead of installed with setup. Use setup whenever you can. The script only registers the service (as Local
System, automatic start, restart after a crash, display name Omnilinker ERP Sync Service). It does not create
the operators group, does not restrict the data folder, and does not start the tray app at sign-in. Without the
group, only an administrator running the tray app elevated can change the agent.
Unpack the copy to a folder outside any user profile, for example C:\Program Files\Omnilinker\ErpSync, then run
in PowerShell as Administrator, from that folder:
uninstall-service.ps1 stops the service, waits up to 30 seconds for it to stop (then ends the process), and
deletes it.