Comment 4 for bug 1079151

Revision history for this message
Nachtfalke (alexander-wilke) wrote :

Just tested on one machine but for me this results in a "loop".
The agent will be updated but it stays in "NOTIFIED" and so will be rerun everytime agent starts again.

Further the script variable "%PROGRAMFILES%" just works on x86 systems but not on x64 systems. Not sure if such a check is in the installer of the agent.exe or not.

The file "OCSNG-Windows-Agent-Setup_done" will be created and contains 3 lines. The first is "SUCCESS" and the other two lines are empty. It is placed here:
C:\ProgramData\OCS Inventory NG\Agent\download

The package in the download folder has the name "1363205496" and the exec_try file contains "1"

I would assume that if "OCSNG-Windows-Agent-Setup_done" contains success then the agent should report that back to server and delete the folder "1363205496" so that it does not result in a loop. Further after 3 times running the agent the exec_try remains on "1" - but I can see that the timestamp of this file will be updated every time I run the agent.

Just for information - I upgraded from 2.0.5.2 to 2.0.5.3 and I modified your script a little bit to make it work on my system:

[code]
@echo off
REM Make a copy of installer to TEMP folder
copy /Y OCS-NG-Windows-Agent-Setup.exe C:\Windows\Temp\OCS-NG-Windows-Agent-Setup.exe
REM Launch uninstall of old agent
cmd.exe /C C:\"Program Files (x86)\OCS Inventory Agent\uninst.exe" /S
REM Install new agent
C:\Windows\Temp\OCS-NG-Windows-Agent-Setup.exe /S /NOSPLASH /UPGRADE /SERVER=http://172.17.240.200/ocsinventory /SSL=0 /DEBUG=1
exit 0
[/code]

I tested this on Windows 7 x64 Enterprise.