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.11.1 available

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

Problem in building OCS Windows Agent

Hello, I am trying to compile OCS Windows Agent on my Windows 10 Pro Machine. I have did it earlier once but now I need to move setup to a new machine. Apparently, I have followed all the steps including building dependencies, building all projects for x64 release with no error or so. After making exe by NSIS, I test run the agent, but I see non-recognizable characters in installation logs. After that, the service does not start automatically, and I get 1062 error. I do not know what could be the reason even if the compilation was successful. I will appreciate any response from you. For your reference, below are installation logs:


Starting OCS Inventory NG Agent setup on 22/06/2023 at 01:24:08

Checking if setup not already running...OK.

Checking Operating System...OK, Windows 2000 or higher.

Command line is: "C:\OCS\WindowsAgent-\NSIS_agent_setup\OCS-Windows-Agent-Setup-x64.exe"
Parsing command line arguments...OK.

Checking for silent mode...Disabled.

Checking for splash screen...Enabled.

Checking if logged in user has Administrator privileges...OK.

Creating directory <C:\ProgramData\OCS Inventory NG\Agent>...

SetACL allowing Users / Power users read/write permissions on <C:\ProgramData\OCS Inventory NG\Agent>...Result: 0

SetACL propagating inherited permissions on <C:\ProgramData\OCS Inventory NG\Agent\Download>...Result: 0

Trying to determine if service was previously installed...Yes.

Trying to stop service and kill processes...

Is Service <OCS Inventory Service> running...???????????????????????????????


Trying to stop Service <OCS Inventory Service>...???????????????????????????????

Is Service <OCS Inventory Service> running...???????????????????????????????

 - Waiting 1 second(s) for Service to stop...

Trying to find process OcsSystray.exe...Result: ?

Trying to kill process OcsSystray.exe...Result: ?

Trying to kill process OcsService.exe...Result: ?

Trying to kill process OCSInventory.exe...Result: ?

Trying to kill process download.exe...Result: ?

Trying to kill process inst32.exe...Result: ?

Waiting 10 seconds for processes to terminate...

Copying new files to directory <C:\Program Files\OCS Inventory Agent>...

Windows XP or higher detected, installing default cURL library and MS CRT/MFC 9.0...

Copying new files status is ;-)

Writing agent configuration file by launching ocsinventory.exe /SAVE_CONF...Result: 0

Windows Advanced Firewall is not available (Vista or higher). Skip adding custom rules.

Creating startup menu shortCut <C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\OCS Inventory NG Systray.lnk> to start Systray applet...

Checking if service OCS Inventory Service is registered into Windows Service Manager...No

No service installed, so no need to unregister OCS Inventory Service from Windows Service Manager.

Registering OCS Inventory Service into Windows Service Manager...Result: 0.

SUCCESS: OCS Inventory NG Agent successfully installed on 22/06/2023 at 01:24:44

in OCS Inventory NG agent for Windows by (330 points)

5 Answers

0 votes
Best answer
The actual found was due to latest NSIS setup (3.09). When I tried with the mentioned version of NSIS (2.46), the compiled EXE file started working as expected.
by (330 points)
0 votes
In OCSInventory github, you could find windows binary agents of ANY versions : see https://github.com/OCSInventory-NG/WindowsAgent/releases.

So why compile yourself windows binaries ?
by (19.4k points)
0 votes
Actually, I am working on a project which depends on OCS Agent. And OCS agent may need some extension so it is important for me to be able to compile it so I can add some extensions in it. Thank you for your quick response. I hope to hear from you soon again.
by (330 points)
0 votes
Are you sure yours needs could NOT be realized by one or more plugins ?

(Plugins is normal way to add features to the agent ...)
by (19.4k points)
0 votes
I am pretty sure that I might need my own changes in the code. And my actual concern is how it is not making correct exe even if I followed all the instructions like I did earlier. I will really help you regarding any kind of help, or any references you can provide. Thank you.
by (330 points)
Powered by Question2Answer