Now that Office also comes in a 64bit install, where in the registry do you find out if the version of Office installed is 32bit or 64bit?
Not via the registry but via commandline tools:
https://stackoverflow.com/a/6194710/2885897
C:\Users\me>assoc .msg
.msg=Outlook.File.msg.15
C:\Users\me>ftype Outlook.File.msg.15
Outlook.File.msg.15="C:\Program Files (x86)\Microsoft Office\Root\Office16\OUTLOOK.EXE" /f "%1"
@clatonh: this is the path of the registry on my PC: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Registration{90140000-002A-0000-1000-0000000FF1CE} and it's definitely a 32-bit-installation on a 64-bit OS.
I've found a secure and reliable way in my InnoSetup-based script to understand whether a particular application is 32-bit or 64-bit (in my case I needed to test Excel), by using a Win32 API function. This function is called GetBinaryType()
, it comes from `kernel32' (despite the name it comes in 32 and 64 bit flavor) and looks directly at the exe's header.
You do not need to script it. Look at this page that I stumbled across:
https://social.msdn.microsoft.com/Forums/office/en-US/43499ae0-bcb5-4527-8edb-f5a955987b56/how-to-detect-whether-installed-ms-office-2010-is-32-or-64-bit?forum=worddev
To summarize:
The fourth field in the productcode indicates the bitness of the product.
{BRMMmmmm-PPPP-LLLL-p000-D000000FF1CE} p000
0 for x86, 1 for x64 0-1 (This also holds true for MSOffice 2013)