Getting Office applications install location. The right way.

 Oftentimes I see in StackOverflow someone asking how to get the location where an office application was installed.

Here are the steps to get it correctly, independent of the version. Let's use Excel for example:

  1. Read the default value of this Registry key: HKCR\Excel.Application
    That value is a GUID containing the CLSID for the Excel application.
  2. Then you use that value to read the default value of this Registry key: HKCR\CLSID\{CLSID}\LocalServer
  3. This will have the path to the Excel executable.

Comments