For quite a long time now the ocs-ng agent version 2.1.1.1 is production running. We encountered a few problems with it (for example not displaying notification message text to user when installing software) and decided to upgrade our agents to new version numbered 2.1.1.3. New version apparently have this fixed, since on multiple test computers the message text was displayed properly. Thus, we have decided to upgrade.
In order to upgrade the agent, you need to:
- create a new package for deployment
- download latest version of ocs-ng agent
- fine tune command to install agent
Assuming you already now how to deploy software using OCS and know what is the difference between “LAUNCH” and “EXECUTE” actions I will just provide essential information.
First, download new version of agent from http://www.ocsinventory-ng.org/en/ and extract OCS-NG-Windows-Agent-Setup.exe file from the archive. Then, zip it again but double check if it is zipped in root of archive, not in directory inside it.
Then fine-tune your install command for upgrade.
Mine is :
OCS-NG-Windows-Agent-Setup.exe /S /UPGRADE /NOSPLASH /NO_SYSTRAY /NOW /SSL=1 /SERVER=https://FQDN/ocsinventory
Switches are:
/S – silent
/UPGRADE – tells the installer that it is an upgrade, so stop OCS service and store success code
/NOSPLASH – do not display OCS splash message
/NO_SYSTRAY – keep OCS hidden from system tray
/NOW – run inventory after installation (sometimes it doesn’t work)
/SSL=1 – Keep SSL turned on
/SERVER – fully qualifed domain name of server with HTTPS prefix
Select Execute action
This should look like:
Click Send button, activate the package and affect computers.
Keep in mind, that this package WILL update the agent upon next inventory cycle (in our environment it is 1 hour) and will report back on NEXT cycle. So be patient. After upgrading, agent will not contact server before on it’s own.
You could of course build a small .bat file, that executes upgrade, then run inventory but this is a bit overkill for such a small change.
Ok, that’s all, pretty easy, huh?
What a pleasure to find someone who idenitfies the issues so clearly
i think the difference between launch and execute is that execute starts a command which is allready on the client
for example “dir”
Why exactly do you choose execute ?
yes, you are right. But if you want to provide parameters, Launch will not work as it only allows to launch single file/application. In order to use launch option, one should wrap all commands into .bat file for example.
To be able to pass parameters directly to executed file, you have to use execute option
Here you have example:
http://wiki.ocsinventory-ng.org/index.php?title=Documentation:Teledeploy#Deploying_package_through_.E2.80.9CLaunch.E2.80.9D_command.
Thanks for your comment!
but i allways use the launch commands with parameters …it works flawless … tested with agent 2.05
me too, to be honest I do not remember why I chose execute. Thanks for marking this up!
Hello!
Does it still valid for migranting from 2.1.x to 2.6.x? Also, it doesn’t need any user/pwd?
Thank you very much!
Felipe.
ocs is always overwritten so backup your configs etc before upgrading.
I do not remember exactly, but i always get into trouble by updating the agent because the Agent has to destroy itself during execution and install the new version.
Not all files in the new version in Ocs-Inventory program folder are replaced after updating in this way.
So i decided to create a Windows Scheduled task which uninstalls the old version and then install the new one.
This task fires 3 minutes after normal Package deployment and was not easy to script. But it works.