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

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

Problem upgrading to Windows Agent 2.1.1

I'm trying to upgrade from Windows Agent 2.0.4 and 2.0.5 to 2.1.1. All servers report Error on opening file for writing on ocsservice.exe.

 

If I first stop the service and the manualy install/upgrade the agent I the same error on file libay32.dll, msvcp90.dll, msvcr90.dll, mfc90u.dll, zlib1.dll, OcsWmi.dll, Sysinfo.dll, OCSInventory Front.dll, Ocsservice.exe, OcsSysTray.exe. Now ocsservice starts but is still the old version.

 

********************************************************
Starting OCS Inventory NG Agent 2.1.1.1 setup on 05/09/2014 at 11:49:28
Checking if setup not already running...OK.
Checking Operating System...OK, Windows 2000 or higher.
Command line is: "<remote setup location>\OCS-NG-Windows-Agent-Setup.exe"
Parsing command line arguments...OK.
Checking for silent mode...Disabled.
Checking for splash screen...Enabled.
Checking if logged in user has Administrator privileges...OK.
Creating directory <C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent>...
SetACL allowing Users / Power users read/write permissions on <C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent>...Result: 0
SetACL propagating inherited permissions on <C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\Download>...Result: 0
Trying to determine if service was previously installed...Yes.
Trying to stop service and kill processes...
Is Service <OCS Inventory Service> running...No.
Trying to stop Service <OCS Inventory Service>...The service has not been started.

Is Service <OCS Inventory Service> running...No - Waiting 1 second(s) for Service to stop...
Trying to kill process OcsSystray.exe...Result: 0
Trying to kill process OcsSystray.exe...Result: 603
Trying to kill process OcsService.exe...Result: 603
Trying to kill process OCSInventory.exe...Result: 603
Trying to kill process download.exe...Result: 603
Trying to kill process inst32.exe...Result: 603
Waiting 10 seconds for processes to terminate...
Copying new files to directory <C:\Program Files\OCS Inventory Agent>...
Windows XP or higher detected, installing default cURL library and MS CRT/MFC 9.0...
 ERROR copying libeay32.dll
 ERROR copying msvcp90.dll
 ERROR copying msvcr90.dll
 ERROR copying mfc90u.dll
 ERROR copying zlib1.dll
 ERROR copying OcsWmi.dll
 ERROR copying SysInfo.dll
 ERROR copying OCSInventory Front.dll
 ERROR copying OcsService.exe
 ERROR copying OcsSystray.exe
Copying new files status is :(
Writing TAG <hostname> into <C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\admininfo.conf> file...
Writing agent configuration file by launching ocsinventory.exe /SAVE_CONF...Result: 128
Windows Advanced Firewall is disabled. Skip adding custom rules.
[/NOW] used, so launching "C:\Program Files\OCS Inventory Agent\ocsinventory.exe"...Result: 128
Creating startup menu shortCut <C:\Documents and Settings\All Users\Start Menu\Programs\Startup\OCS Inventory NG Systray.lnk> to start Systray applet...
Checking if service OCS Inventory Service is registered into Windows Service Manager...Yes
Nothing to do to register OCS Inventory Service into Windows Service Manager.
Starting OCS Inventory Service...Ok.
ERROR: OCS Inventory NG Agent 2.1.1.1 may not work correctly since 05/09/2014 at 11:56:57
:(

Related OS: Windows 2003 SE, EE, Windows 2008 SE.

I'm running a manual script with psexec and following command:

\\<remote location>\Windows-Agent-<version>\OCS-NG-Windows-Agent-Setup.exe /S /SERVER=http://<OCS server>/ocsinventory /TAG=%COMPUTERNAME% /NOW /NOSPLASH

This worked for me to install 2.0.4 and later upgrade to 2.0.5 without reboot. If I try to update to 2.1.1 I need to reboot to let the system release ocsservice.exe.  I also tried the option /UPGRADE without luck.
asked in OCS Inventory NG agent for Windows by (170 points)
edited by

3 Answers

0 votes
Can you explain exactly how do you upgrade your agent ?

And on wich version of windows
answered by (20k points)
I'm running a script Remote OCS-NG-Windows-Agent.bat that contains

.\psexec.exe @servers.txt -s -i -c OCS-NG-Windows-Agent.bat

OCS-NG-Windows-Agent.bat:

.\OCS-NG-Windows-Agent-Setup.exe /S /SERVER=http://<ocs server>V/ocsinventory /TAG=%COMPUTERNAME% /NOW /NOSPLASH /NO_SYSTRAY

OS versions: Windows Server 2003 SE/EE SP2, Windows Server 2008 (R2) SE.

I also tried with /NOSOFTWARE and /UPGRADE.

Same problem with deployment tool and local install as user "nt authority\system".

Output on Citrix server running Windows Server 2003 EE SP2:

********************************************************
Starting OCS Inventory NG Agent 2.1.1.1 setup on 11/09/2014 at 10:45:24
Checking if setup not already running...OK.
Checking Operating System...OK, Windows 2000 or higher.
Command line is: .\OCS-NG-Windows-Agent-Setup.exe /S /NOSOFTWARE /SERVER=http://<OCS server>/inventory /TAG=<hostname> /NOW /NOSPLASH /NO_SYSTRAY
Parsing command line arguments...OK.
Checking for silent mode...Enabled.
Checking for splash screen...Disabled.
Checking if logged in user has Administrator privileges...OK.
Creating directory <M:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent>...
SetACL allowing Users / Power users read/write permissions on <M:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent>...Result: 0
SetACL propagating inherited permissions on <M:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\Download>...Result: 0
Trying to determine if service was previously installed...Yes.
Trying to stop service and kill processes...
Is Service <OCS Inventory Service> running...No.
Trying to stop Service <OCS Inventory Service>...The service has not been started.

Is Service <OCS Inventory Service> running...No - Waiting 1 second(s) for Service to stop...
Trying to kill process OcsSystray.exe...Result: 603
Trying to kill process OcsService.exe...Result: 603
Trying to kill process OCSInventory.exe...Result: 603
Trying to kill process download.exe...Result: 603
Trying to kill process inst32.exe...Result: 603
Waiting 10 seconds for processes to terminate...
Copying new files to directory <M:\Program Files\OCS Inventory Agent>...
Windows XP or higher detected, installing default cURL library and MS CRT/MFC 9.0...
 ERROR copying OcsService.exe
Copying new files status is :(
Writing TAG <<hostname>> into <M:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\admininfo.conf> file...
Writing agent configuration file by launching ocsinventory.exe /SAVE_CONF...Result: 0
Windows Advanced Firewall is disabled. Skip adding custom rules.
[/NOW] used, so launching "M:\Program Files\OCS Inventory Agent\ocsinventory.exe"...Result: 0
[/NO_SYSTRAY] used, so removing Systray applet startup menu shortcut <M:\Documents and Settings\All Users\Start Menu\Programs\Startup\OCS Inventory NG Systray.lnk>...
Checking if service OCS Inventory Service is registered into Windows Service Manager...Yes
Nothing to do to register OCS Inventory Service into Windows Service Manager.
Starting OCS Inventory Service...The service did not respond to the start or control request in a timely fashion.
.
ERROR: OCS Inventory NG Agent 2.1.1.1 may not work correctly since 11/09/2014 at 10:46:29
:(
0 votes
It turn's out that wmiprvse.exe (windows management instrumentation) has ocsservice.exe locked. After stopping this service, the file ocsservice.exe is updated. No need to reboot the server.
answered by (170 points)
0 votes
We have found that in order to more succesfully update the OCS agent, you should use teh presently installed OCS Agent's "Unist.exe" file to first remove the older version. Once completed (a reboot may be requested) you should be able to load teh new agent in.
answered by (150 points)
 
Powered by Question2Answer
...