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.

Problème Script de Déploiement OCS Inventory Agent par GPO Ordinateur Windows

Bonjour,
J'ai beaucoup besoin de votre aide.
Je veux déployer l'agent OCS-NG-Windows-Agent (version 2.1.1.1) par GPO via mon serveur virtuel Win serv 2012. Fichier script.bat de déploiement
J'ai suivi toutes les étapes, mais rien ne s'installe sur les postes clients.
GPO->Modifier->Configuration ordinateur->Stratégies->Paramètres du logiciel->Paramètres Windows->Stratégie de résolution de noms->Scripts(démarrage/arrêt)->Démarrage->(onglet scripts) Parcourir...Choix de mon fichier.bat->Rien dans champ "Paramètres"->OK---Ajouter les fichiers->Colle le fichier.bat->OK
Redémarrage du PC, 5mn après démarrage lance "gpupdate /force"
RESULTAT = AUCUNE INSTALLATION D'AGENT
Même en exécutant le script en local, aucune installation de l'agent.
Je serai très heureux que quelqu'un me vienne en aide.
PS: j'ai lancé le fichier ".bat" en local à partir d'un compte admin local et aussi d'un compte normal. Même résultat, zéro agent.

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

1 Answer

0 votes

C'est dans le but de synchroniser avec GLPI. J'ai déjà installé le plugin OCS Inventory dans GLPI
Une copie de mon script.bat

REM ********************************************************************************
REM **** OCSAgentSetup.exe install by GPO                                       ****
REM **** by Philippe BEAUMONT                                                   ****
REM **** You must use it in a logon computer script in your Active Directory    ****
REM **** Not made to use with OCS Logon : Simply use the OCS setup agent        ****
REM ********************************************************************************

REM **** Please set here the version of the agent you use.
REM **** Change it to upgrade the agent on all computer.
set VERSION=2.1.1.1

REM **** This is the fully qualified domain name of your OCS Inventory ng server.
set OCSSERVER=http://172.xx.xx.xx/ocsinventory

REM **** You must put here the address of your file server where OCS-NG-Windows-Agent-Setup.exe is.
REM **** For exemple :
REM **** If OCS-NG-Windows-Agent-Setup.exe is on \\filesserver\public\ocs\OCS-NG-Windows-Agent-Setup.exe
REM **** you must put : fileserver\public\ocs
set INSTALLSERVER=SRV-GLPI\Users\**\**\**

REM **** Set to ON if you want install the SSL certificat and activate deployement feature
REM **** before enable it : put the file cacert.pem on the sames directory as OCS-NG-Windows-Agent-Setup.exe
set DEPLOYE=ON
IF %PROCESSOR_ARCHITECTURE%==x86 SET INSTALLDIR=%ProgramFiles%
IF %PROCESSOR_ARCHITECTURE%==AMD64 SET INSTALLDIR=%ProgramFiles(x86)%

IF EXIST "%INSTALLDIR%\OCS Inventory agent\OCSInventory.exe" goto upgrade

:install
\\%INSTALLSERVER%\OCS-NG-Windows-Agent-Setup /S /SERVER=%OCSSERVER%/ocsinventory /NOSPLASH /DEBUG /NOW /NOTAG
cd "%INSTALLDIR%\OCS Inventory agent\"
echo pwouet > %VERSION%.txt
goto end

:upgrade
IF EXIST "%INSTALLDIR%\OCS Inventory agent\%VERSION%.txt" goto end
\\%INSTALLSERVER%\OCS-NG-Windows-Agent-Setup /S /SERVER=%OCSSERVER%/ocsinventory /NOSPLASH /DEBUG /NOW /NOTAG
cd "%INSTALLDIR%\OCS Inventory agent\"
echo pwouet > %VERSION%.txt

:end
IF NOT %DEPLOYE%==ON goto endend
IF EXIST "%INSTALLDIR%\OCS Inventory NG\Agent\cacert.pem" goto endend
xcopy \\%INSTALLSERVER%\cacert.pem "%ALLUSERSPROFILE%\OCS Inventory agent\" /Y

:endend

by (160 points)
Vérifies que le répertoire partagé où se trouve l'agent est bien accessible a tout le monde même sans être dans le domaine.
J'ai créé un fichier partage sur mon serveur auquel j'ai attribué que le droit de lecture. C'est bon?
Est-ce qu'il n'y a pas un paramètre particulier (en ligne de commande) qu'il faut renseigner dans "Paramètres du script" lors de la modification de la GPO ?
 
Powered by Question2Answer
...