locked
How to detect whether installed MS Office 2010 is 32 or 64 bit RRS feed

  • Question

  • Please... help needed to detect programatically whether installed MS Office is 32 or 64 bit.

    I know it is very simple if outlook 2010 is installed using key

    HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Office\\14.0\\Outlook\\Bitness

    but i am looking solution in case oulook 2010 is not installed.

     

    Thanks in advance...

    Friday, July 9, 2010 11:07 AM

Answers

  • Thanks to Aaron Rykhus of Microsoft for this one during the beta ...
     
     
    There's the product code GUID.
     
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
    *32-bit on 64-bit OS will be in HKLM\Software\Wow6432Node
     
    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
     
    Example
    64-bit
    {90140000-0011-0000-1000-0000000FF1CE}
    32-bit
    {90140000-0011-0000-0000-0000000FF1CE}
     
    2007 article (should apply to 2010 as well)
    http://support.microsoft.com/kb/928516/
    *32-bit on 64-bit OS will be in HKLM\Software\Wow6432Node
     
    One of the Office developers I checked with said "You could use the
    MsiEnumProducts (windows function) function to enumerate all the product Ids
    on the system. And then parse the product ids to check if office is
    installed and which bit office is it."
     
     
    --
    Enjoy,
    Tony
     
    www.WordArticles.com
     
    "Dinesh Patil" wrote in message news:43499ae0-bcb5-4527-8edb-f5a955987b56...
    > Please... help needed to detect programatically whether installed MS
    > Office is 32 or 64 bit.
    >
    > I know it is very simple if outlook 2010 is installed using key
    >
    > HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Office\\14.0\\Outlook\\Bitness
    >
    >
    > but i am looking solution in case oulook 2010 is not installed.
    >
    >
    >
    > Thanks in advance...
    >
     
     

    Enjoy,
    Tony
    www.WordArticles.com
    • Marked as answer by Bessie Zhao Friday, July 16, 2010 5:28 AM
    Friday, July 9, 2010 2:50 PM

All replies

  • Thanks to Aaron Rykhus of Microsoft for this one during the beta ...
     
     
    There's the product code GUID.
     
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
    *32-bit on 64-bit OS will be in HKLM\Software\Wow6432Node
     
    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
     
    Example
    64-bit
    {90140000-0011-0000-1000-0000000FF1CE}
    32-bit
    {90140000-0011-0000-0000-0000000FF1CE}
     
    2007 article (should apply to 2010 as well)
    http://support.microsoft.com/kb/928516/
    *32-bit on 64-bit OS will be in HKLM\Software\Wow6432Node
     
    One of the Office developers I checked with said "You could use the
    MsiEnumProducts (windows function) function to enumerate all the product Ids
    on the system. And then parse the product ids to check if office is
    installed and which bit office is it."
     
     
    --
    Enjoy,
    Tony
     
    www.WordArticles.com
     
    "Dinesh Patil" wrote in message news:43499ae0-bcb5-4527-8edb-f5a955987b56...
    > Please... help needed to detect programatically whether installed MS
    > Office is 32 or 64 bit.
    >
    > I know it is very simple if outlook 2010 is installed using key
    >
    > HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Office\\14.0\\Outlook\\Bitness
    >
    >
    > but i am looking solution in case oulook 2010 is not installed.
    >
    >
    >
    > Thanks in advance...
    >
     
     

    Enjoy,
    Tony
    www.WordArticles.com
    • Marked as answer by Bessie Zhao Friday, July 16, 2010 5:28 AM
    Friday, July 9, 2010 2:50 PM
  • OK, that is very static and tedious!  For example, you need to know the product code, and the product code is different for each release of Office.  There has to be a better way, like to check a file path or a different, more easily-identifiable registry key.

    - Jay

    Thursday, September 28, 2017 1:40 PM
  • Use same #if solution as when you declare with PtrSafe

    #if Vba7 then '  Code is running in the new VBA7 editor
         #if Win64 then
         '  Code is running in 64-bit version of Microsoft Office
         #else
         '  Code is running in 32-bit version of Microsoft Office
         #end if
    #else
          ' Code is running in VBA version 6 or earlier
    #end if

    see https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/64-bit-visual-basic-for-applications-overview

    Tuesday, October 10, 2017 10:24 AM