找到office word 2010的安装路径
我发现这篇文章描述了如何找到office的安装路径:
http://support。 microsoft.com/kb/234788/en-us
但是文章中仅提供了 Office 2007 之前的 GUID,Office 2010 的 GUID 是什么或者在哪里可以找到它们?
I found this article which describe how to find the install path of office:
http://support.microsoft.com/kb/234788/en-us
But in the article are only the GUIDs up to office 2007, what are the GUIDs for office 2010 or where can I find them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我使用这些注册表项:
如果您有 MSI 安装程序,则可以使用 RegLocator 表(注册表搜索)。
I use these registry entries:
If you have a MSI installer you can use RegLocator table (registry searches).
通常,对于通过 Windows Installer 服务安装并支持从一个版本更新到下一个版本的产品,有更好的方法来执行此操作。使用从 Office MSI 文件的属性表中获取的升级代码。
我没有一堆 Office 版本可供比较,但如果他们采纳了自己的建议并保持跨版本的升级代码不变,那么您可以调用 MsiEnumRelatedProducts 来获取您安装的 Office 版本的产品代码机器。使用产品代码,您可以调用 MsiGetProductInfo 来获取安装位置、版本、安装日期、应用于安装的转换列表......很多东西。
这样做,您就不必担心无法检测到某些未来版本的 Office。
这是您想要查看的文档。
http://msdn.microsoft.com/en -us/library/aa370103%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/aa370130%28v=VS.85%29.aspx
Generally there's a better way to do this for products that are both installed via the Windows Installer service and support updating from one version to the next. Use the upgrade code, which you get from the Property table of an Office MSI file.
I don't have a bunch of Office versions to compare, but if they've taken their own advice and kept the upgrade code constant across versions, then you can call MsiEnumRelatedProducts to get the product code for the version of Office that's installed on your machine. With the product code you can call MsiGetProductInfo to get the install location, the version, the date it was installed, a list of transforms that were applied to the install... lots of stuff.
Do it this way, and you don't have to worry about not being able to detect some future version of Office.
This is the documentation you want to be looking at.
http://msdn.microsoft.com/en-us/library/aa370103%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/aa370130%28v=VS.85%29.aspx
这看起来像你需要。
This seems like what you need.
对于 Office 2010,您可以尝试通用密钥:
For Office 2010 you can try the Common key: