Get LibreOffice Version with macro

Hi, i have libre Office 6 on windows 7 x64 and i am trying to get the version of the libreoffice and whether it is x86 or x64 with basic macro on calc, but i could not find a way to do that.
With the code below i can get the program version, but i also need to know if it is x86 or x64.

Sub getVersion

Dim oProdNameAccess As Object

GlobalScope.BasicLibraries.LoadLibrary("Tools")

oProdNameAccess=GetRegistryKeyContent("org.openoffice.Setup/Product")

MSGBOX oProdNameAccess.getByName("ooSetupVersion")

End sub

Hi

This is probably not the best way to proceed but, at least with Windows you should be able to do:

dim oContext as object, sUrl as string

oContext = GetDefaultContext().getByName("/singletons/com.sun.star.util.theOfficeInstallationDirectories")
sUrl = oContext.OfficeInstallationDirectoryURL

if Instr(sUrl,"x86") > 0 then
	print "32"
else
	print "64"
end if

Regards

It’s not exactly what i was looking for, but it helps a lot the code above, thenks

You find the wanted information, much more, and relevant links here:
https://forum.openoffice.org/en/forum/viewtopic.php?f=25&t=91542&p=433811&hilit=get+openoffice+version#p433811

(The macro demonstrated by Zizi64 in his first attachment there e.g. also works with LibreOffice 6.0,3.2)

Edit 1 regarding the comment by @PYS:
My answer was too rash. I since investigated the mentioned code and in specific the node /org.openoffice.Setup and couldn’t find the bitwidth anywhere.

Hi @Lupp

I may be wrong but it seems to me that the need is not only to get the version number but to know if it’s 32 or 64 bits

Regards

@PYS: Thanks and sorry. I obviously was too lazy to read the question completely.

Thanks, i will take a look on openoffice forum