OCSInventory-NG / Packager-for-Windows

The packager helps installing OCS Inventory NG Agent for Windows (or any windows application). It create an executable package including multiple files to install, and is able to run the installation process under the specified account having Administrative privileges.
Other
12 stars 7 forks source link

Provide uninstall Agent then plugins install last setup Agent #2

Closed keyoneplus closed 3 years ago

keyoneplus commented 6 years ago

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Operating system : Window 10

OCS Inventory informations

Windows agent version : 2.3.0.0

Problem's description

Describe your problem here

Doing upgrade from 2.1.1.1 to 2.3.0.0 (WINDOWS agent) in silent mode, via remote. Do not provide uninstallation.

Is better to provide clear up old files from 2.1.1.1 agent when doing an upgrade to 2.3.0.0. There an /upgrade option but only valid for 1.x Agent which is long time ago. Hope there an /upgrade=previous_agent_folder_path ( to run uninst.exe) this will provide a clean uninstallation then transfer plugins files and last the new agent setup process (NSIS_agent_setup) . So unnecessary old files is clear (fig2)

Fig 1 image Fig 2 image

Thanks.

gillesdubois commented 6 years ago

Hi,

Your problem can come from 2 things :

The /UPGRADE is not for agent coming from 1.X only. It's used for every agent update and make the installer check for process and kill them.

Regards, Gilles Dubois.

keyoneplus commented 6 years ago

1) Ocspackage.exe is launch with Administrator privileges image

2) The Command line is: "C:\Users\keyone\AppData\Local\Temp\nsfF9C6.tmp\OcsSetup.exe" /server=http://myocs/ocsinventory /no_systray /ssl=1 /now /s /upgrade. where ocspackage.exe will trigger Setup.exe , it did kill the processes OcsSystray.exe, OcsService.exe and so on. However it did not delete unnecessary lib files. It simple just copying over(3). image

The setup.exe did not handle delete of unwanted lib files. Suggest that the ocspackage.exe can run uninstall process before the transfer of plugin and setup begin. In this sequence the plugins file will be clear.

keyoneplus commented 6 years ago

Other issue : is the killing process base on one off or time out 1) cmdline without /UPGRADE , it will still try to stop service (2) , then time out, proceed to kill process with timeout (3) show no error. then proceed to copy new file. And the OcsService.exe have error during copying, this because i use another process to open it to simulate the error.
with /UPGRADE it will provide " Writing setup result for Package ID <> to file <C:\ProgramData\OCS Inventory NG\Agent\Download\OCSNG-Windows-Agent-Setup_done>"

image

kiquenet commented 6 years ago

how install OCS Inventory in Windows ? step by step ?