Installation: how is LibreOffice installation stored in Windows registry

Good morning,
While installing LibreOffice on a customer’s PC, I’d like to know if it has been installed before.

Following a piece of source code, I expect this information to be found in the Windows Registry, under key "\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LibreOffice\".

However, after having installed LibreOffice 5.3, I’ve found a registry entry at key "\HKEY_LOCAL_MACHINE\SOFTWARE\LibreOffice\LibreOffice\".

Which is correct or is it possible that the key has been changed during one of the latest versions?

The differences are caused by different bitness of the LO installed. If you install 32-bit version, it will be seen under Wow6432Node on a 64-bit OS; if you install 32-bit version on 32-bit OS, or 64-bit version on 64-bit OS, it will create keys under HKEY_LOCAL_MACHINE\SOFTWARE\LibreOffice.

So, to reliably check for an installed version (e.g. in a script), you should check both locations (check \HKEY_LOCAL_MACHINE\SOFTWARE\LibreOffice\UNO\InstallPath, and if not found, check \HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LibreOffice\UNO\InstallPath).