如何检查机器上安装的MS Office版本

时间:2022-03-25 20:26:38

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#.

我正在开发一个控制台应用程序,它在注册表上执行一些操作。我没有使用任何互操作程序集办公室,但我需要知道办公室版本。如何使用C#确定计算机上安装的MS Office版本。

2 个解决方案

#1


Search in (using the Registry class)

搜索(使用Registry类)

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
  • 8.0 - 98

  • 9.0 -2000
  • 10.0 -2002
  • 11.0 -2003
  • 12.0 -2007
  • 14.0 -2010

Here is a c# implementation

这是一个c#实现

#2


I had the same requirement, but I also have to find out whether office installed is 32-bit or 64-bit. I have documented my solution here:

我有同样的要求,但我还必须找出安装的办公室是32位还是64位。我在这里记录了我的解决方案:

http://cyrilbeschi.blogspot.com/2014/03/how-to-find-microsoft-office-version.html

#1


Search in (using the Registry class)

搜索(使用Registry类)

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
  • 8.0 - 98

  • 9.0 -2000
  • 10.0 -2002
  • 11.0 -2003
  • 12.0 -2007
  • 14.0 -2010

Here is a c# implementation

这是一个c#实现

#2


I had the same requirement, but I also have to find out whether office installed is 32-bit or 64-bit. I have documented my solution here:

我有同样的要求,但我还必须找出安装的办公室是32位还是64位。我在这里记录了我的解决方案:

http://cyrilbeschi.blogspot.com/2014/03/how-to-find-microsoft-office-version.html