我的要求是确定安装的 ms Office 版本。
是否安装了 MSOffice 2007、是否安装了 MSOffice 2010、是否安装了 MSOffice 2013、是否安装了 MSOffice 2016。
我需要通过某些 API 的代码或通过读取任何特定的注册表项来获取上述信息。注册表项在所有版本的 MSOffice 中都是通用且一致的。
我也不喜欢查看 Office 应用程序版本(例如 Word、Outlook 或 Excel 版本)来决定 MSOffice 版本,因为我不确定这是否一致。
最佳答案
请查看以下文章,它们将帮助您了解如何确定是否安装了 Office 以及哪些应用程序和版本:
Description of the numbering scheme for product code GUIDs in Office 2010
How to determine which version of a 2007 Office product is installed
How to determine the service pack level of your Office 2010 suite
通常,Windows 注册表路径包含指示 Office 版本的数字。例如:
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\15.0\Outlook
其中 15.0
代表 Office 2013 等。
关于python - 通过代码或者注册表获取已安装的office版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41121575/