Where is a reliable registry key to find install location of Excel 2007?
Solution 1
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
Solution 2
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.
Solution 3
Here is another direction you can go. I have not tested this.
http://support.microsoft.com/kb/240794
Jason
Updated on May 12, 2020Comments
-
Jason almost 4 years
Where is a reliable registry key to find install location of Excel 2007?
-
Jason over 15 yearsThis is not on all my systems.
-
Jason over 15 yearsThis is not in all my systems that have Excel 2007.
-
Jason over 15 yearsI have Excel 2007 and I do not have this key. :( I have up to \App Paths, but no excel.exe listing.
-
natem345 about 11 yearsCould it be an x64 vs x86 issue? It may be under HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\X.0\Common\InstallRoot