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 http://wiki.ocsinventory-ng.org. Read it before asking your question.

Update OCS Agent 2.8.0.0 to 2.9.0.0 not working

Hi,

we had create a package with command line option :

windows executable : OcsPackage-2.9.0.0.exe

options : /S /UPGRADE /SERVER=https://ocsinventory/ocsinventory

uninst.exe,OcsService.exe, OCSInventory.exe,OcsSystray.exe,OcsNotifyUser.exe are in version 2.9.0.0

except Download.exe how are allready stay in version 2.8.0.0 ?

have you an isolution to upgrade properly ?

Best regards,

Willy
in OCS Inventory NG agent for Windows by (660 points)

9 Answers

0 votes
I confirm! I also have the same problem.
by (160 points)
0 votes

Hi,

for agent upgrade, you must use the initial setup file (for eg. OCS-NG-Windows-Agent-Setup.exe) et NOT the packaged file (generated by ocspackager).

See Wiki OCS Inventory for explanations.

by (32.6k points)
0 votes

Hi,

@ i use the setup downloaded here

https://github.com/OCSInventory-NG/WindowsAgent/releases/download/2.9.0.0/OCS-Windows-Agent-2.9.0.0_x64.zip

OCS-Windows-Agent-Setup-x64.exe and i confirm Download.exe not upgrade and stay in 2.8.0.0 version

have you a solution to upgrade ocs agent without GPO because all the users work from home most of the time.

by (660 points)
edited by
0 votes
Indeed, with some machines (for me about ~15 %), download.exe and / or OcsService.exe files are not updated.

It might be necessary to create a script to :

- Stop the OCS service, replace the obsolete file(s) and then Start the OCS service.
by (32.6k points)
0 votes
We cant use OCS to do that ! i come to try and it doesnt work i kill the servie but download proces stay running adn systray too and if you kill it you kill everything and "c'est la merde"

and we cant use GPO because all the users work from home most of the time.

and use psexec.....wait the computer are online to launch it ......
by (660 points)
0 votes
Hi,you should create a secondary agent how upgrade the primary ?
by (660 points)
0 votes

I found a clean solution:
first create a package which drops the files in c: \ app for example
the executable agent setup and a powershell script

this script unisntall ocs agent and install the new version in 2.9.0.0


upgradeAgent.ps1


Start-Process -Wait "c:\app\OCS-Windows-Agent-Setup-x64.exe" -ArgumentList "/S /UPGRADE /SERVER=https://OCSINVENTORY.YOURS/OCSINVENTORY"
exit


and create a second package which creates a task which will execute the script locally:

tachePlanifie.bat


powershell -executionpolicy bypass -noprofile -command "&{ .\TachePlanifie.ps1}"


TachePlanifie.ps1


$Time = Get-Date -Format "HH:mm"

$Params = [ordered]@{
    TaskName = 'MiseAjour-AgentOCS-2.9.0.0';
    TaskPath = '\';
    Action = New-ScheduledTaskAction -Execute "Powershell.exe" -Argument "C:\app\upgradeAgent.ps1";
    Trigger = New-ScheduledTaskTrigger -Once -At $Time;
    Principal = New-ScheduledTaskPrincipal -UserId "NT AUTHORITY\SYSTEM" -RunLevel Highest;
    Description = "Mise à jour de l'agent OCS";
    Settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries;
    Force = $true;
}

Register-ScheduledTask @Params

Start-ScheduledTask -TaskName "MiseAjour-AgentOCS-2.9.0.0"


I thing it's a good solution !

Willy

by (660 points)
edited by
0 votes

ARRRGG another probleme :

Starting OCS Inventory Agent on Wednesday, August 25, 2021 09:27:24.
AGENT => Running OCS Inventory Agent Version 2.9.0.0
AGENT => Using OCS Inventory FrameWork Version 2.9.0.0
AGENT => Loading plug-in(s)
AGENT => Using network connection with Communication Server
AGENT => Using Communication Provider <OCS Inventory cURL Communication Provider> Version <2.9.0.0>
AGENT => Sending Prolog
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #404>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:01.

by (660 points)
0 votes
if you install the setup 2.9 manually its ok

So

we return to the 2.8.0.0.......
by (660 points)
 
Powered by Question2Answer
...