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.

Exit code of Launch action - deployment

Hi,

I am trying to create packages which use a batch file to complete actions.

I have added "exit /b 0" at the end of the script to return a SUCCESS to the agent.

It is not working - does anybody else have any ideas?

Jack
in OCS Inventory NG agent for Windows by (370 points)

1 Answer

0 votes
 
Best answer

Hi Jack,

I have already deployed BATCH scripts and that is no problem.

It seems to me that I used the "Execute" command with a simple "Exit" at the end of the file ...

To be sure, you can add a line in your batch file, like :

Echo Result at %time% : %errorlevel% >> "%temp%"\OCS_packages.log

In TEMP directory, if the OCS_packages.log file is created / updated, the batch file is executed correctly.

​Warning : If you act in "Program files", the tree structure is different according to the OS's architecture :

If %PROCESSOR_ARCHITECTURE%==x86 set ArchDir=%ProgramFiles%
If %PROCESSOR_ARCHITECTURE%==AMD64 set ArchDir=%ProgramFiles(x86)%

Regards, Stéphane

by (32.6k points)
selected by
 
Powered by Question2Answer
...