Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to check MS office version installed on the machines

Tags:

c#

ms-office

I am working on a console app which perform some operation on registry. I am not using any interop assembly for office but i need to to know office version. How to determine which version of MS office is installed on the machine using C#.

like image 655
Kapil Avatar asked Dec 10 '22 20:12

Kapil


1 Answers

Search in (using the Registry class)

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths

or

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths

Version numbers are

  • 7.0 -97
  • 8.0 - 98
  • 9.0 -2000
  • 10.0 -2002
  • 11.0 -2003
  • 12.0 -2007
  • 14.0 -2010

Here is a c# implementation

like image 132
Johnno Nolan Avatar answered Dec 12 '22 09:12

Johnno Nolan