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.

ERROR *** DOWNLOAD <EXIT_CODE_1>

OCS-server 2.5 windows agent 2.4

Created packege(execute comand : C:\activation.bat)  and try do deploy
get this error
Starting OCS Inventory NG Package Download and Setup Tool on Tuesday, March 19, 2019 13:05:34.

DOWNLOAD => Running OCS Inventory NG Download Version 2.4.0.0

DOWNLOAD => Using OCS Inventory NG FrameWork Version 2.4.0.0

DOWNLOAD => Using network connection with Communication Server

COM PROVIDER => Loading Communication Provider <C:\Program Files (x86)\OCS Inventory Agent\ComHTTP.dll>

DOWNLOAD => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.4.0.0>

DOWNLOAD => Starting new period of 10 cycles

DOWNLOAD => Flushing package queue

DOWNLOAD => Parsing directory <C:\ProgramData\OCS Inventory NG\Agent\download> for packages

DOWNLOAD => Verifying package <C:\ProgramData\OCS Inventory NG\Agent\download\1552991565>

DOWNLOAD => Package <1552991565> verified and added to process queue

DOWNLOAD => Processing packages for cycle 1 on Tuesday, March 19, 2019 13:05:34

DOWNLOAD => Pausing for cycle latency (15 seconds)

DOWNLOAD => Processing packages for cycle 2 on Tuesday, March 19, 2019 13:05:49

DOWNLOAD => Pausing for cycle latency (15 seconds)

DOWNLOAD => Processing packages for cycle 3 on Tuesday, March 19, 2019 13:06:04

DOWNLOAD => Pausing for cycle latency (15 seconds)

DOWNLOAD => Processing packages for cycle 4 on Tuesday, March 19, 2019 13:06:19

DOWNLOAD => Pausing for cycle latency (15 seconds)

DOWNLOAD => Processing packages for cycle 5 on Tuesday, March 19, 2019 13:06:34

DOWNLOAD => Executing action <EXECUTE> for package <1552991565>

PACKAGE => Executing command <C:\activation.bat> for package <1552991565> on <Tuesday, March 19, 2019 13:06:34>

PACKAGE => Package <1552991565> successfully executed. Command exit code is <1>. Package return code is <EXIT_CODE_1>

PACKAGE => No post execution command provided for package <1552991565>

ERROR *** DOWNLOAD => Will not register package <1552991565> in history: result <EXIT_CODE_1> not a success

DOWNLOAD => Sending result code <EXIT_CODE_1> for package <1552991565>

DID_CHECK => Read DeviceID <VOVKA-2019-02-26-16-19-37> and MACs <BC:AE:C5:21:25:8F30:9C:23:ED:53:D420:CF:30:81:53:7500:19:5B:86:D6:0F> in file <ocsinventory.dat>

COM SERVER => Initializing cURL library for sendRequest

COM SERVER => Using cURL without server authentication

COM SERVER => Disabling cURL proxy support

COM SERVER => Enabling cURL SSL server validation support using CA Bundle <cacert.pem>

COM SERVER => Sending HTTP Post request to URL <http://ocs-server.tk.sat.ua/ocsinventory>

COM SERVER => HTTP Post response received <HTTP Status Code #200>

COM SERVER => Cleaning cURL library

DOWNLOAD => Result code request successfully sent

DOWNLOAD => Pausing for fragment latency (5 seconds)

DOWNLOAD => Pausing for cycle latency (15 seconds)

DOWNLOAD => Processing packages for cycle 6 on Tuesday, March 19, 2019 13:06:54

DOWNLOAD => Pausing for cycle latency (15 seconds)

DOWNLOAD => Processing packages for cycle 7 on Tuesday, March 19, 2019 13:07:09

DOWNLOAD => Pausing for cycle latency (15 seconds)

DOWNLOAD => Processing packages for cycle 8 on Tuesday, March 19, 2019 13:07:24

DOWNLOAD => Pausing for cycle latency (15 seconds)

DOWNLOAD => Processing packages for cycle 9 on Tuesday, March 19, 2019 13:07:39

DOWNLOAD => Pausing for cycle latency (15 seconds)

DOWNLOAD => Processing packages for cycle 10 on Tuesday, March 19, 2019 13:07:54

DOWNLOAD => Pausing for cycle latency (15 seconds)

DOWNLOAD => Pausing for period latency (1 seconds)

DOWNLOAD => Starting new period of 10 cycles

DOWNLOAD => Flushing package queue

DOWNLOAD => Parsing directory <C:\ProgramData\OCS Inventory NG\Agent\download> for packages

DOWNLOAD => No package found, exiting

DOWNLOAD => Unloading communication provider

DOWNLOAD => Execution duration: 00:02:37.
in OCS Inventory NG agent for Windows by (270 points)

3 Answers

+1 vote

Hi,

PACKAGE => Executing command <C:\activation.bat> for package <1552991565> on <Tuesday, March 19, 2019 13:06:34>
PACKAGE => Package <1552991565> successfully executed. Command exit code is <1>. Package return code is <EXIT_CODE_1>

The C:\activation.bat script returns error code 1(=ERRORLEVEL). Check your script and/or add 'exit 0'  at the end.

Regards

by (6.2k points)
0 votes

C:\activation.bat 

list oj bat

 @Echo off

cscript slmgr /ckms 

cscript slmgr /skms 10.10.10.10

cscript slmgr /ato 

exit 0

Package return code is OK Senks fore help

but it didnt chanege activation server to 10.10.10.10

by (270 points)
0 votes

1) In your package, run the command with cmd:

cmd / c c:\activ...

2) Try to redirect the output of the script to a file by removing the echo off.

Depending on the configuration of the PCs, the scripts are not necessarily launched with the necessary elevation of privileges.

I prefer to use a tool like Inno Setup that correctly handles this issue :
[Setup]
...
PrivilegesRequired = admin

by (6.2k points)
 
Powered by Question2Answer
...