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

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

Deploying winupdate .msu package through OCS agent

Hi everyone,

as the main question suggests: is it possible to deploy an MSU package through OCS agent, for sending a windows update/KBxxxxxx to my managed clients?

According to wiki : http://wiki.ocsinventory-ng.org/05.Deployment/Deploying-packages-or-executing-commands-on-client-hosts/ i can't understand if the procedure will work for MSU packages too.

Anyway, my ocs server is actually a bit outdated (2.1.2), but i can manage to update everything first and then proceed with creating packages to deploy.

thank you in advance

BT
in OCS Inventory NG agent for Windows by (220 points)

6 Answers

+1 vote

hy, yes it is .. it easy

just create a cmd file for example install.cmd

the content should be something like this

wusa.exe Windows6.1-KB3023607-x64.msu /quiet /norestart

Then zip the install.cmd and your Windows6.1-KB3023607-x64.msu file

upload the package to the ocs-inventory server

choose launch ..install.cmd

cklick send . now you have a package .. but before deplyoment you must activate that package

Kind regards

...

by (20k points)
0 votes
Hi, we are trying to deploy an application , (exe or msi doesn't matter for now) but we are continously encountering troubles:
this is what we tried:

1- uploading zip containing only exe package, additional arguments specified   ->> error exit code 1

1b- zip with exe file inside, in package optional argument "filename.exe", still error exit code 1

1c- zip with exe package and install.bat file (containing the command to launch filename.exe); optional argument "install.bat", same exit code 1 error.

2- uploading a zip file containing msi package, optional argument "msiexec /i packageName.msi " --> error  exit code1639 (on the target machine, msiexec process starts telling us that the command syntax is wrong, seems like he cannot find the specified "packagename" )

3- uploading a zip file containing msi + install.bat file with inside "msiexec /i packageName.msi", and optional argument in package properties "install.bat" . same error as above.

4- we even tried "store" function, creating .zip package wich contains a simple txt file. in the optional arguments, file path to store -> c:\temp ; when launching inventory on target machine, ocsinventory log shows "STORE succeded" but no file appears in the specified path.

To sum it up, teledeploy function is working, based on the fact we showing logs telling us the downloads are happening correctly.

Beside that, nothing really happens on the client machine once the downloaded packages has been aquired.
All the packages the client receives are NOT launched, and are deleted in minutes after their download.

Sadly, OCS WIKI is really poor in that and contains no detailed instructions regarding how to troubleshoot this kind of behaviours.
by (220 points)
+1 vote

i really can tell you that it works because i have deployed hundreds of different packages.

I recommend that you create a test.cmd file (not a bat file)

content of the test.cmd should be

echo "hello world" >c:\testoutput\test.txt

This file should be zipped .. but remember to place the test.cmd in root level of the zip file .. No Folder below should be used for this example.

The zip file should be uploaded with the launch option.

in the launch command you should type in test.cmd

On the client you should create the folder c:\testoutput before deploying the package

After deployment you should have the test.txt in c:\testoutput with the content hello world

I think you are doing something wrong with the zipping ..just right click on the test.cmd ..send to zip. Do not zip the folder above your file.

Kind regards

sokatra

by (20k points)
0 votes

i really can tell you that it works because i have deployed hundreds of different packages.

I recommend that you create a test.cmd file (not a bat file)

content of the test.cmd should be

echo "hello world" >c:\testoutput\test.txt

This file should be zipped .. but remember to place the test.cmd in root level of the zip file .. No Folder below should be used for this example.

The zip file should be uploaded with the launch option.

in the launch command you should type in test.cmd

On the client you should create the folder c:\testoutput before deploying the package

After deployment you should have the test.txt in c:\testoutput with the content hello world

I think you are doing something wrong with the zipping ..just right click on the test.cmd ..send to zip. Do not zip the folder above your file.

Kind regards

sokatra

Hi @Sokatra and thank you for your kind reply.

I can now confirm i had get things "partially" working by zipping the files i wish to deploy.

I tried several things, "store file" is working correctly; "Install MSI file" seems to work too.

the only thing I can't get to work is creating packages containing EXE files or MSU (win update) files.

whenever i create a zip package containing an exe/msu file, the package is created but the package size is zero.

trying to create a package containing an MSI file, the package size is correct and that package becomes full functional and deployable; the same thing happens also by loading a package with a generic .cmd or .xls file inside.

While with an .exe/msu file inside, the package is generated correctly, but the size is zero, and every time I try to deploy this package I always get an "EXIT_CODE_1" error.

The procedure used for zipping a file is always the same and always put the file i want to deploy in the root of the zip file. 

My aim was to be able to distribute windows updates through ocs, as I wrote to you previously.

OCS does not allow me to insert packages containing exe files or msu files, whenever I do, the package is created but the size is zero and then the whole process crashes.

Can you tell me how to fix that?

by (220 points)
0 votes
Do you have a virus scanner which deletes the exe files? you should disable or uninstall the antivirus temporarily
https://support.microsoft.com/en-us/windows/turn-off-defender-antivirus-protection-in-windows-security-99e6004f-c54c-8509-773c-a4d776b77960

also please have a look here

https://ask.ocsinventory-ng.org/12166/cant-deploy-package-exit_code_1

and please look at my private message
exe files are definitely working
Kind regards

Sokatra
by (20k points)
0 votes
i can confirm that with server 2.8.1 one zipped exe file has a package size of zero after activation.

But i can't reproduce the  It might happens that i clicked on fragment number so the field "Estimated time for deploy" has a value .. i don't know.
by (20k points)
edited by
 
Powered by Question2Answer
...