在Windows 7中使用MSI安装时,在注册表中会发生什么?(what happens in th

2019-09-23 13:40发布

当在Windows 7安装程序(所有Windows版本将是真棒知道......但Windows 7将足以满足现在)与MSI ...

- 什么&其中上安装注册表中所做的更改以及如何做所有这些变化之间的相互关系?

-如何我可以找到所有与给定的安装我应该永远需要它的数据的,我必须去通过注册表来获取这个数据,或有另一种访问数据更有效或更合适的方法?

Answer 1:

使用MSI API,如MsiGetProductInfoEx功能 。 注册表中的数据大多是无证,因为它是一个实现细节,作为汉族提到。



Answer 2:

我一直在玩的注册表和装置,看看我能想出。 如果任何人都可以对我的回答进一步阐述或进行任何修正,这将不胜感激,因为这答案只有来自观察,而不是从任何官方消息。 我做了一些表来描述我所发现的,如下图所示。 此外,用于访问所需的(即,MSI的产品名称或产品代码属性)我已经遇到WIX(信息http://wixtoolset.org/ )和正在使用Micrsoft.Deployment.Installer.dll以及其他库附带WIX,因为他们是相当宕甜蜜。

我不知道所有键和代码,我在这里引用的官方术语...因此,如果好像我做了起来,因为他们似乎什么来指定的,因为我也不会感到惊讶。

更新:我刚刚发现在MSI文档一些有用的信息,可能在这里赞赏: http://msdn.microsoft.com/en-us/library/windows/desktop/aa372105(v=vs.85).aspx



Answer 3:

Using MsiGetProductInfoEx (and possibly MsiEnumProductsEx) is the recommended programmatic method to get information about installed products. Using this approach, you could then compare changes to the ProductCode, ProductVersion, and package code (i.e. Revision Number Summary property) values. A small update to the application however could leave the ProductCode and ProductVersion unchanged. A typical small update changes only one or two files or a registry key, and in this case the package code should also be changed. However, a product shipped with a language transform might have the same package code as the product without the tranform.

If you are developing your own Windows Installer package that needs to determine whether the user has already installed a version of the application, you can use the Windows Installer service to search for a specific file or directory during your application's installation. This approach requires populating the appropriate tables in the Windows installer database and the msi should run the AppSearch Action. This method is describe in Microsoft's Windows Installer documentation published here:

Searching for Existing Applications, Files, Registry Entries or .ini File Entries



文章来源: what happens in the registry when installing with an MSI in Windows 7?