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

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

Upgrade of windows agent v2.7 -> v2.8 imperfect

Hello!

After the server has been successfully upgraded v2.7 -> v2.8 I try to upgrade the windows agents using the documented procedure. The upgrade completes with "SUCCESS" but some modules stay v2.7. In detail:

ComHTTP.dll, Download.exe, OCSInventory Front.dll, SysInfo.dll, OcsWmi.dll

The agent log files continue to have entries like:

AGENT => Using Communication Provider <OCS Inventory cURL Communication Provider> Version <2.7.0.1>
DOWNLOAD => Running OCS Inventory Download Version 2.7.0.1

Using a different upgrade mechanism (in this case EMCO Remote Installer) the upgrade runs thoroughly.

Server: v2.8,  Debian 10 version 10.3.23-MariaDB-0+deb10u1, PHP 7.3.19, Apache 2.4.38, VMware 15.5 platform

Win-Agents: x64 v2.7 / v2.8 on Windows 10 Prof. v1909

Thanks a lot in advance!

ago in OCS Inventory NG agent for Windows by (290 points)
reshown ago by

3 Answers

0 votes
 
Best answer

that's really a pity, but a long time ago I built a script that uninstalls and installs cleanly.

But perhaps you can try this before

just launch the update with the execute command line in the deployment

OCS-Windows-Agent-Setup-x86.exe /S /upgrade /nosplash /now /no_systray /ssl=1 /server=https://yourxyz.domain

see here

https://miloszengel.com/how-to-update-ocs-ng-inventory-agent-for-windows-to-2-1-1-3/

These command are for the 2.05 version .. you must adapt it for the current version 2.8.0

I think it was a difference if you just use the execute action  .. because otherwise some processes are in use (with launch action)

my script creates a task .. which uninstalls the agent .. and then install the new one. So the ocs-inventory agent isn't in use during uninstallation and installation.

Kind regards

ago by (12.8k points)
selected ago by
0 votes
Even a batched uninstallation and reinstallation (without using the /UPGRADE option) of the windows agent doesn´t work correctly using OCS software deployment. The uninstallation leaves some files in the program path, the new installation has the same version mix as mentioned before and the active status of the packet stays NOTIFIED. I´ll better use an external tool for updating the windows agents.
ago by (290 points)
edited ago by
0 votes

The update script

i used 2 scripts

the second scripts (ocstask.cmd) starts after some minutes calculated from install time . so because i use a windows task .. i don't have a problem with ocs-inventory files in use.

The script imitates just the uninstallation by a user and the reinstall by a user.

my zip package consist of the follwowing files

install.cmd

OcsLogon.exe

Ocspackage.exe

first script named install.cmd

setlocal
set hh=%time:~0,2%

if "%hh:~,1%"=="0" set hh=%hh:~1,2%

set mm=%time:~3,2%

if "%mm:~,1%"=="0" set mm=%mm:~1,2%

set /A mm=%mm%+2

if %mm% GEQ 60 set /A mm=%mm%-60 && set /A hh=%hh%+1

if %hh% GEQ 24 set hh=00

if %mm% LSS 10 set mm=0%mm%

if %hh% LSS 10 set hh=0%hh:~1,1%

set hhmm=%hh%:%mm%

rem different languages uses different schtask commands

for english

set taskvar1=once

goto Install

:install

xcopy /Y ocspackage.exe %windir%\temp
xcopy /Y ocslogon.exe %windir%\temp
xcopy /Y ocstask.cmd %windir%\temp

schtasks /delete /tn "OCSDeploy" /f
SCHTASKS /Create /F /V1 /Z /SC %taskvar1% /TN "OCSDeploy" /RU "" /TR "%windir%\temp\ocstask.cmd" /ST %hhmm%
goto end:

:end
endlocal

rem set h=%time:~0,2%
rem set m=%time:~3,2%
rem set s=%time:~6,2%
rem Echo %h%.%m%:%s%

--------------------

the second script -named ocstask.cmd

OcsLogon.exe /uninstall /S
ping localhost -n 10
ocspackage.exe
del %windir%\temp\ocspackage.exe
del %windir%\temp\ocslogon.exe
del %windir%\temp\ocstask.cmd

PS: perhaps you wonder why there a goto commands .. these are leftovers from a larger script , which detects the OS (win XP, or Win 7 ord Win10 and 32 and 64 bit) so i can use install the correct ocsinstaller depending on the client Operating System

ago by (12.8k points)
edited ago by
 
Powered by Question2Answer
...