How to detect Office 2019 programmatically?

孤人 提交于 2019-12-20 02:54:44

问题


We are used to detect the currently installed Office version by getting the full version (e.g. from the file info of an installed Office executable) and map the mayor version to a friendly name, like 15 maps to "Office 2013", 16 to "Office 2016".

However, there is no major version number change for Office 2019. The version number we get is 16.0.10827.20138

Is there a reliable way to map the minor version number to "Office 2019"? From which value onward will it be 2019? Is there another way to detect if Office 2019 is installed?

Are there no more minor updates to "Office 2016"?


回答1:


From what we have found out the Office version numbers/build numbers can be the same for Office 2016, 2019 and Office 365.

Office 2016 and 2019 are supposed to have frozen feature sets while Office 365 will auto-update with new features. At some stage O365 and other build numbers will overlap. We found also that Office 2016 installed with Click-to-Run may have the same build number as 2019, although it is meant to contain security updates only.

Office 2016 installed with MSI will have a static build number. There's no MSI installer for Office 2019, meaning it will auto-update and its build numbers might increase the same way as the ones for Office 365?

In any case: it is no longer possible to determine the Office version from the build number. We have resorted to look up the following registry key in addition:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun 

If it doesn't exist and the major version number is 16 it is an Office 2016 MSI install.

If it exists, you know it's a Click-to-Run installation and you can examine the following subkey value from which you can infer 2016, 2019 or 365:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration\ProductReleaseIDs 

Example values are "O365ProPlusRetail" or "ProPlus2019Retail" or just "ProPlusRetail"

Any better suggestions welcome.




回答2:


Office 365, Office 2019, and Office 2016 all have the same version: 16.0. You can refer to the following link:

Supported scenarios for installing different versions of Office, Project, and Visio on the same computer

Currently, Microsoft has not released a message to stop updating office2016.

I've only seen from the document that office2019 has only one release, and if you've installed office2019, then your office2019 is the start.

Please See the following link:

Update history for Office 2019



来源:https://stackoverflow.com/questions/52892882/how-to-detect-office-2019-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!