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.

Déployer OCS inventory Agent 2.3.0.0 par GPO

Bonjour,

J'aimerais déployer l'agent OCS inventory 2.3.0.0 par GPO via un script bat. Mais malheuresement le script que j'ai utilisé par GPO consistant à être exécuter au démarrage d'une machine client n'a pas l'aire de fonctionner. L'agent c'est pas déployé sur le poste client que j'ai visé malgré un gpupdate et un redémarrage du poste client. Quelqu'un pourrais m'éclairer please ?

Ci-dessous le script que j'ai utilisé:

@echo off
ECHO *******************************************************************************
ECHO **** Installation automatisee par GPO de l'Agent OCS Inventory NG          ****
ECHO **** Par Dylan Marboeuf                                                    ****
ECHO **** Inspire du script de Philippe BEAUMONT                                ****
ECHO **** Version 1.01 - 14/02/2017                                             ****
ECHO ****                                                                       ****
ECHO **** A utiliser dans une GPO au demarrage de l'ordinateur                  ****
ECHO *******************************************************************************

REM **** Indiquer ici la version de l'agent. Ce numero est verifié au démarrage de l'ordinateur.
REM **** Le fait de changer le numéro provoquera une mise à jour.
set VERSION=2.3.0.0

REM **** URL d'acces au serveur OCS. Peut être un nom DNS ou une IP.
set OCSSERVER=http://ip_de_mon_serveur/ocsinventory

REM **** Indiquer ici le chemin complet vers l'executable de l'installation d'OCS Agent (chemin CIFS)
set INSTALLSERVER=\\MDMCTR\ocsinventory\ocs

REM **** ================================= ****
REM **** NE PAS TOUCHER AU CODE CI DESSOUS ****
REM **** ================================= ****

IF EXIST "%programfiles(x86)%" goto 64b
echo Systeme 32 bits detecte
set PROGFOLDER=%programfiles%
echo Dossier d'installation : %PROGFOLDER%\OCS Inventory agent
goto suite
:64b
echo Systeme 64 bits detecte
set PROGFOLDER=%programfiles(x86)%
echo Dossier d'installation : %PROGFOLDER%\OCS Inventory agent

:suite
IF EXIST "%PROGFOLDER%\OCS Inventory agent\OCSInventory.exe" goto checkupgrade

echo Installation
%INSTALLSERVER%\OCS-NG-Windows-Agent-Setup.exe /S /SERVER=%OCSSERVER%/ocsinventory /NOSPLASH /DEBUG /NOW /NO_SYSTRAY
IF NOT ERRORLEVEL 0 goto end
echo %VERSION% > "%PROGFOLDER%\OCS Inventory agent\DEPLOYEDVERSION.txt"
goto end

:checkupgrade
type "%PROGFOLDER%\OCS Inventory agent\DEPLOYEDVERSION.txt" | find "%VERSION%" > nul
IF ERRORLEVEL 1 goto upgrade
IF ERRORLEVEL 0 goto end

:upgrade
echo Upgrade Requise
%INSTALLSERVER%\OCS-NG-Windows-Agent-Setup.exe /S /SERVER=%OCSSERVER%/ocsinventory /NOSPLASH /UPGRADE /DEBUG /NOW /NO_SYSTRAY
IF NOT ERRORLEVEL 0 goto end
echo %VERSION% > "%PROGFOLDER%\OCS Inventory agent\DEPLOYEDVERSION.txt"

:end

Merci à vous !
in OCS Inventory NG agent for Windows by (140 points)

1 Answer

0 votes
Bonjour,

Des erreurs dans le fichier de log de l'agent?

Cordialement

Frank
by (88.5k points)
 
Powered by Question2Answer
...