- The Windows service (
Omnilinker.ErpSync.Service.exe). It talks to Omnilinker, runs the connector and keeps the agent’s settings. It runs as Local System and opens no network port. - The Wapro connector (
connectors\wapro\Omnilinker.ErpIntegration.Connectors.Wapro.Host.exe). A separate process that connects to your ERP database: the service starts it when the service starts and checks the database with it. It runs as Local System, like the service. - 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. You connect the agent to it with a connection code. See Create a connection.
- Check the machine against the requirements.
- You need a local administrator account: Windows asks for an administrator’s approval twice during installation.
- 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 the installer
Open
OmnilinkerErpSync-stable.msi. Windows asks for an administrator’s approval, and the agent is installed to
C:\Program Files\OmnilinkerErpSync\current. This is the install folder. It contains the service,
appsettings.json, and the tray app in its own tray subfolder.Use the MSI. The release also contains
Setup.exe, which the update feed uses. Opened by hand, it installs
into your own user profile, and the service, which runs as Local System, is never registered from a folder
that a signed-in person can change: anyone who could replace its files could run code as SYSTEM.2
Finish installing
When the files are in place, the tray app opens Finish installing. The MSI cannot register a Windows service
by itself, because it runs its own setup steps without administrator rights. Choose Finish installing and
approve once more. The approval prompt comes from that window, so it appears in front of it.If you choose Later, nothing syncs from this computer yet. The tray app asks again the next time it starts:
at the next sign-in, or when you open Omnilinker ERP Sync from the Start menu.Finishing does the following:
Finally, the service starts, and the tray app opens its setup, where you connect the agent.If a service called
OmnilinkerErpSyncService already exists, for example from an earlier version, finishing
points it at this installation and keeps its other settings, including its Log On account.3
Check the result
Status should be Running.Finishing 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.%LocalAppData%\Omnilinker\ErpSync\setup-trace.log of the person who installed it. To try again, open
Omnilinker ERP Sync from the Start menu: the tray app offers Finish installing until the service runs
from this installation. Every step can run again safely. See Troubleshooting.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, except where the ERP database is (the server, the database, the SQL Server user and the company number): only operators see that. The password and the agent’s key are never shown. Changing the agent needs more. Only these people can run the tray app’s setup, change the ERP database settings, check, restart or refresh the connector in Settings, pause the agent, and install a downloaded update now:- members of the local group Omnilinker ERP Sync Operators,
- administrators whose tray app runs elevated (Run as administrator).
Next step
Connect the agent in the tray app: see Set up the agent. It opens by itself after installation. If it does not, open Omnilinker ERP Sync from the Start menu.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 the agent is not running a command. 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 connection, its settings, the agent’s local database and its 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 shows the version and a downloaded update in
Settings… > Updates: Check now looks for one, and Install now installs it as soon as nothing is
syncing. See Settings.
To update by hand, open the new version’s MSI. It replaces the installed version: the service and the tray app
restart into the new version, and your configuration is kept.
Upgrade from an earlier version
Install the new version over the old one, as in Update the agent or with the new MSI. Then check:- Connect the agent again if setup opens. The agent now reads its connection only from
%ProgramData%\Omnilinker\ErpSync. A computer connected by an older version that kept its connection elsewhere opens setup after the update: connect it again with a new code from Connect a PC. - Wapro: check the company number. In the tray app, open Settings… > Change… and fill in Company number
if it is empty (usually
1). The connection form requires it now, but nothing asks for it after an update, and without it the agent reads no lists, even though its checks pass. See The company number. - Click Refresh lists once on the connection’s Overview tab in Omnilinker, so the product links are made from the ERP’s product list. See Lists and mappings.
- Delete the old local database if you like. Earlier versions kept a queue in
erpsync.db, inC:\Windows\System32\config\systemprofile\AppData\Local\Omnilinker\ErpSync(or the profile folder of the account the old service ran as). The agent no longer reads it, and you can delete that folder. - Scripts that used the local API stop working. Earlier versions answered on
http://localhost:5555. The agent opens no network port any more; use the connection’s PC and connector tab and the agent’s log files instead.
install-service.ps1. Exit the old tray
app, run uninstall-service.ps1 from the old install folder in PowerShell as Administrator, uninstall the old version in
Settings > Apps > Installed apps, then install the agent and connect it with a code.
Remove the agent
1
Uninstall the app
Open Settings > Apps > Installed apps (on Windows 10: Apps & features) and uninstall
Omnilinker ERP Sync. You need an administrator’s approval.Windows may say that a restart will be needed, because the service is running from the files it removes.
Choose OK; you do not need to restart. The service notices that its files are gone and removes itself
within half a minute: it unregisters the Windows service, removes the tray app from sign-in and deletes the
rest of the install folder. The tray app closes by itself.
2
Delete local data (optional)
Uninstalling keeps the agent’s data folder,
%ProgramData%\Omnilinker\ErpSync, for support and in case you
reinstall. It holds the encrypted connection (credentials.dat), the agent’s local database (agent.db), the
cached configuration and the log files. A new installation on this computer starts connected to whatever
credentials.dat names.Delete the folder, as an administrator, if you are not reinstalling the agent on this computer, or if you will
connect a reinstalled agent to another connection. If an earlier version left
C:\Windows\System32\config\systemprofile\AppData\Local\Omnilinker\ErpSync, you can delete it too.3
Remove the operators group (optional)
Uninstalling keeps the Omnilinker ERP Sync Operators group on purpose, so a reinstalled agent keeps its
operators. To remove it, run in PowerShell as Administrator:
Run the agent as a console program (support)
Omnilinker support may run the agent as a console program for a pilot or to diagnose a problem, instead of as the Windows service. A console program does not run as Local System, so it cannot write%ProgramData%\Omnilinker\ErpSync.
It then needs the environment variable OMNILINKER_ERPSYNC_DATA_ROOT set to an absolute path of a folder it can write;
without it, it stops at start and names the variable. The installed service never uses this variable. Do not set it for
the service.
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.