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

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

how to send a status of script execution


for a project i used OCS inventory:

for the moment i launch a batch script to update a configuration on a system with OCS, however i can't inform the Administrator if the script exit before, in all case the status of deployed are Success.

In my script i have a lot of mean to exit the script if they have an errore. In this case i would like inform OCS inventory that the script exit with error  and forced the status of the deployement to Success or ERR_ABORTED or other status .

Is it possible by command line in batch files.

Best Regard


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

1 Answer

+1 vote
in my case i use the command "exit" in batch files with a exitcode which i specify - this exit code can be seen in the OCS Server



EXIT [/B] [exitCode]

  /B          specifies to exit the current batch script instead of
              CMD.EXE.  If executed from outside a batch script, it
              will quit CMD.EXE

  exitCode    specifies a numeric number.  if /B is specified, sets
              ERRORLEVEL that number.  If quitting CMD.EXE, sets the process
              exit code with that number.
by (11.4k points)
Powered by Question2Answer