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.

Deploy OcsAgent via GPO

Hi all,

i've follow istruction to create a ocspackage.exe with his installer, using a domain admin account, and with this options set:

/S /NOW /SERVER=https://my.server.lan/ocsinventory  /NOSPLASH /DEPLOY=2.4.0.0

I've put in Gpo manager on my DC, under user configuration, windows settings, script, startup. (under user because under computer installation task don't work).

I've put ocspackage.exe in sysvol folder without option (because its embedded, i suppose). i've applied policy and now at login ocsagent is installed.

I've two problems:

I can't see systray icon, so i don't know if agent is installed, unless lookgin for service or process, so option /NO_SYSTRAY(that isn't in script) is not triggered (maybe?)

Every time that i login on pc or server, installation task start again, so option /DEPLOY=2.4.0.0(that IS in script) is not triggered (maybe?)

I'm using ocs inventory server version 1:10.4.12+maria~bionic-log 2.7, and 2.4.0.0 packager and agent.

Someone can help me?

thanks
in OCS Inventory NG agent for Windows by (120 points)

3 Answers

0 votes
hy , you could use ocslogon.exe in comination with the ocspackage.exe (ocspacke.exe can be uploaded to the ocs-inventory server).

Launcher “OcsLogon.exe” is a little tool able to run inside a login script or an ActiveDirectory GPO. His goal his to launch OCS Inventory NG Agent on computer, and if Agent isnot installed, to setup Agent on computer

ocslogon.exe /GPO /PACKAGER /NP /DEPLOY=2.1.1.3 /server:yourdomain.com

OCSLogon Parameter

https://github.com/OCSInventory-NG/WindowsAgent/tree/master/logon

perhaps the ocslogon is only available in older agent packages-
But you can use the old ocslogon.exe with a new agent

 or just use a script which checks if the client allready installed in combination with the normal installer

@echo off
if exist "%programfiles%\OCS Inventory Agent\OCSInventory.exe" goto end

OCS-NG-Windows-Agent-Setup.exe /S /SERVER=yourserverdnsname /NO_SYSTRAY

:end

There are many more command options to deploy the agent.

In the past you can use 1 ocpackage.exe which you upload to your ocs server.

The ocslogon.exe downloads it to the client and installs it.

But today there are many compatility problems (new agent is ony 64 bit compatible for example)

so you should use a script which runs and check if you have a 32 or 64 bit OS and Windows 7 or windows 10. Depending on that the script installs the correct Agent Version with the normal installer.

hewre are some ver very old scripts by Philippe BEAUMONT

https://www.forum-microsoft.org/viewtopic.php?t=138219

here a complete manual

https://curie77.fr/ocs-inventory/

The systray icon is maybe no visible because reinstallation which ocurs when your computer restarts

https://github.com/OCSInventory-NG/WindowsAgent/issues/137

in my tests an upgrade install (which you are doing without intention) often does work , becuase of services which aren't restart and files which are open. So for the client "upgrade" i uninstall the client completely and reinstall the new agent.

How to upgrade the agent normaly is described here

https://miloszengel.com/how-to-update-ocs-ng-inventory-agent-for-windows-to-2-1-1-3/
by (24.4k points)
edited by
0 votes
Hi,

@matteocava: use computer gpo and not user gpo.

@sokatra: ocslogon.exe is no more used and 2.1.1.3 version is too old and no more supported.

Regards

Frank
by (90.2k points)
0 votes
@Frank ocslogon.exe is no more used and 2.1.1.3 version is too old and no more supported.

hy Frank, this was just an example

But i will take this opportunity to point out that sometimes you have to use old agents.

In real  world you will have 32 Bit Win 10 and you will have XP Clients. So we must use those old clients, because 2.6.0.1 doesn't support 32bit and our XP clients musst run  with 2.1.1.1 agent- (yes i know.. it is not recommended and quite dangerous)

Kind regards Sokatra
by (24.4k points)
 
Powered by Question2Answer
...