ha oui petite précision
Ce matin j'avais bien l'agent installé sur mon poste client, mais je ne sais plus grâce à quel fichier .bat (car je l'ai modifié trop de fois, et quand ça a réussi je n'ai pas pu voir tout de suite car c'est une installation silencieuse).
Cependant j'ai trouvé un fichier .txt dans le dossier partagé de l'OCS Agent Setup. Le voici
********************************************************
Starting OCS Inventory NG Agent 2.0.5.0 setup on 15/03/2013 at 11:15:10
Checking if setup not already running...OK.
Checking Operating System...OK, Windows 2000 or higher.
Command line is: \\192.168.1.203\OCS\OCS-NG-Windows-Agent-Setup /S /SERVER=192.168.1.203/ocsinventory /NOSPLASH /DEBUG /NOW
Parsing command line arguments...OK.
Checking for silent mode...Enabled.
Checking for splash screen...Disabled.
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: error
SetACL propagating inherited permissions on <C:\ProgramData\OCS Inventory NG\Agent\Download>...Result: error
Trying to determine if service was previously installed...No.
Trying to stop service and kill processes...
Trying to kill process OcsSystray.exe...Result: 603
Trying to kill process OcsService.exe...Result: 603
Trying to kill process OCSInventory.exe...Result: 603
Trying to kill process download.exe...Result: 603
Trying to kill process inst32.exe...Result: 603
Waiting 10 seconds for processes to terminate...
Copying new files to directory <C:\Program Files (x86)\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.
[/NOW] used, so launching "C:\Program Files (x86)\OCS Inventory Agent\ocsinventory.exe"...Result: 0
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
Registering OCS Inventory Service into Windows Service Manager...Result: 0.
Starting OCS Inventory Service...Ok.
SUCCESS: OCS Inventory NG Agent 2.0.5.0 successfuly installed on 15/03/2013 at 11:16:09
;-)
Bon visiblement ça a fonctionné à un moment de la journée
Mais plus maintenant
Voici mon fichier OCSagent.bat
@echo off
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=2050
REM **** This is the fully qualified domain name of your OCS Inventory ng server.
set OCSSERVER=http://192.168.1.203
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=\\192.168.1.203\OCS
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=OFF
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
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
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
Que dois-je mettre pour insérer des pause entre chaque commandes ?
(mise à part "pause", car en exécutant le .bat, je ne vois rien apar "appuyez sur entrée pour continuer"
Merci