Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Prevent OcsService.exe file from disappearing

Hi,

on a growing number of our machines, the agent stops sending the inventory to the server because at some point the OCS Service can't be launched anymore after the file OCSService.exe disappears for some mysterious reason.

The installation is fine at this point because I can just copy the missing file back and it can be restarted again.

For more context, we're running the v2.10.1 agent and the v2.12.1 server and the issue happens to machines that are not always on our LAN (WFH laptops, etc.) and hence often they will not be able to contact the OCS server.

So is there a way to prevent the OCSService from disappearing in this context?
And what's a best practice to do the inventory of remote machines with OCS?

Thanks
in OCS Inventory NG agent for Windows by (420 points)

11 Answers

0 votes
This has happened in the companies I manage.

The OCS Agent services simply disappear.

In this case, I created a BAT/CMD script that validates the existence of the service; if it doesn't exist, it creates it pointing to the file in its correct directory.

If the file doesn't exist, it reinstalls the OCS Agent.

If everything is OK, it simply forces an inventory, which doesn't cause any harm.

If you are interested, contact me via WhatsApp +55 62 9 9410-8188
ago by (620 points)
edited ago by
 
Powered by Question2Answer
...