Where is a reliable registry key to find install location of Excel 2007?

后端 未结 5 835
挽巷
挽巷 2021-01-06 09:04

Where is a reliable registry key to find install location of Excel 2007?

相关标签:
5条回答
  • 2021-01-06 09:29

    I'm using the following key:

    [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe]
    

    If the folder name contains Office12, you've got 2007. I'm using this method to decide during installation to install Office 2000-2003 addins or Office 2007 addins, as well as the folder to install them to.

    This is extremely reliable, and also works well with localized versions of Windows. So far we've tested on French, German, Spanish and Italian with much better success than the other methods we were previously using. XLSTART should be the same in all languages, but be wary when developing word addins as "STARTUP" is localized in some cases.

    0 讨论(0)
  • 2021-01-06 09:32

    How about:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\X.0\Common\InstallRoot]
    

    which contains a key named 'Path' with the installation directory of that version of Office. This is consistent for Excel 8.0 through 12.0. If you want to look for a specific product, use Excel, Word, Access, etc., in place of Common.

    • Jon ------- Jon Peltier, Microsoft Excel MVP

    From: http://www.developersdex.com/vb/message.asp?p=2677&r=6199020

    0 讨论(0)
  • 2021-01-06 09:32

    I have found this key to be consistent across all my Office 2007 installations.

    [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\9B905EB838DBFEE4991CF8E66F518BBF]
    

    If you are reading this, and you have Excel 2007, can you Vote this up (or leave a comment) if it is reliable for you too? (Vote it down, or post a comment if it is wrong?)

    NOTE: This is not consistent across my machines.

    [HKLM\SOFTWARE\Microsoft\Office\X.0\Common\InstallRoot]
    
    0 讨论(0)
  • 2021-01-06 09:39

    Here is another direction you can go. I have not tested this.

    http://support.microsoft.com/kb/240794

    0 讨论(0)
  • 2021-01-06 09:42

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Excel\InstallRoot\

    0 讨论(0)
提交回复
热议问题