Open ggzengel opened 3 years ago
I use:
OCS-Windows-Agent-Setup-x64.exe /S /UPGRADE /NOSPLASH /NO_SYSTRAY /NOW /SSL=1 /SERVER=https://xxx/ocsinventory
@gillesdubois: What do you think?
Can confirm this behaviour. If you rely on extensions (what most likely everybody does) the OCSPackager for Windows can be seen as broken for updates because of this bug.
I will switch back to my "old" deployment strategy with a zip file and a batch file. I share it with you here as some kind of "workaround" as long as the bug is not getting fixed.
The zip file contains the following files:
agent.zip
├── 0_silent-install-script.cmd
├── AUTHORS.TXT
├── cacert.pem
├── CHANGELOG
├── DISCLAMER.TXT
├── EasyCopy_x64
│ ├── ProgramData
│ │ └── OCS Inventory NG
│ │ └── Agent
│ │ └── cacert.pem
│ └── Program Files (x86)
│ └── OCS Inventory Agent
│ └── Plugins
│ ├── driverslist.vbs
│ ├── listprinters.vbs
│ ├── ...
├── EasyCopy_x86
│ ├── ProgramData
│ │ └── OCS Inventory NG
│ │ └── Agent
│ │ └── cacert.pem
│ └── Program Files
│ └── OCS Inventory Agent
│ └── Plugins
│ ├── driverslist.vbs
│ ├── listprinters.vbs
│ ├── ...
├── LICENSE.TXT
├── OCS-Windows-Agent-Setup-x64.exe
├── OCS-Windows-Agent-Setup-x86.exe
├── OPTIONS.TXT
├── Plugins
│ ├── driverslist.vbs
│ ├── listprinters.vbs
│ ├── ...
└── README.TXT
0_silent-install-script.cmd
@ECHO OFF
cd /D "%~dp0"
set /p tag=Please enter TAG for OCS Inventory:
:CheckOS
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
:64BIT
echo 64-bit OS...
xcopy /s/e /h /y EasyCopy_x64\*.* C:\
OCS-Windows-Agent-Setup-x64.exe /s /server=https://ocs.domain.de/ocsinventory /tag="%tag%" /ssl=1 /ca="cacert.pem" /now /nosplash
GOTO END
:32BIT
echo 32-bit OS...
xcopy /s/e /h /y EasyCopy_x86\*.* C:\
OCS-Windows-Agent-Setup-x86.exe /s /server=https://ocs.domain.de/ocsinventory /tag="%tag%" /ssl=1 /ca="cacert.pem" /now /nosplash
GOTO END
:END
echo Finished...
Yes, i confirm the bug if you have a 32bits agent, you upgrade to 32 or 64 bits agent, the plugin directory is in program files and the binary are in program files (x86) The plugins used are in folder C:\Program Files (x86)\OCS Inventory Agent\plugins
It's ok if it's a fresh install with 64bits version, the binary are in program files folder (not x86)
I confirm the problem when upgrading from 32-bit to 64-bit.
One way to fix this is to do a "clean upgrade".
OCS Inventory Service
.C:\Program Files (x86)\OCS Inventory Agent
directory.@echo off
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OCSInventory.exe" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OCS Inventory NG Agent" /f
With ocs agent running as system service, no way to remove hklm registry entry, not enough rights :-(
It says it installs on upgrade to
C:\Program Files\OCS Inventory Agent
but the binaries are inC:\Program Files (x86)\OCS Inventory Agent
. The plugins are inC:\Program Files\OCS Inventory Agent\Plugins