卸载:注册表项不会被删除。 (Installshield 2010) [英] Uninstall: registry entry not get removed. (Installshield 2010)

查看:208
本文介绍了卸载:注册表项不会被删除。 (Installshield 2010)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有常见的ISM模板。我使用相同的ISM模板创建了3个MSI,但具有不同的ProductName和ProductVersion以及ComponentName。组件文件是动态的。注册表项路径包含路径中的ComponentName(对于所有MSI显然是不同的),但是在相同的< CompanyName>下创建。注册表项可以视为在< CompanyName>下共享。



所有3个MSI安装都正常,文件和注册表项都是正确的。但是当我卸载任何MSI时,与之关联的注册表项不会被删除。注册表项仅针对上次卸载的MSI被删除,前2个已卸载的MSI未被删除。



例如



MSI1:HKEY_LOCAL_MACHINE \ SOFTWARE \< CompanyName> \ ABC \ Component1

MSI2:HKEY_LOCAL_MACHINE \ SOFTWARE \< CompanyName> \ ABC \Component2

MSI3:HKEY_LOCAL_MACHINE \ SOFTWARE \< CompanyName> \ abC \ Component3





MSI1卸载,注册表项Component1未删除。

MSI2卸载,注册表项Component2未删除。

MSI3卸载,注册表项组件3被删除..



无论订单如何,仅在上次卸载时删除注册表项。更改注册表安装行为如果不存在则安装,卸载(如果存在)没有帮助。



有什么办法,或者只有CustomAction是解决方案吗?

I have common ISM template. I have created 3 MSI using same ISM template but with different ProductName and ProductVersion and ComponentName. The component files are dynamic. The registry key path contains the ComponentName in the path (which is obviously different for all MSI) but get created under same <CompanyName>. The registry key can be considered as shared under <CompanyName>.

All 3 MSI installation went fine with proper file and registry entries. but when I uninstall any of the MSI, the registry key associated with it is not getting removed. The registry key is getting removed only for the last uninstalled MSI, for first 2 uninstalled MSI it is not getting deleted.

E.g.

MSI1: HKEY_LOCAL_MACHINE\SOFTWARE\<CompanyName>\ABC\Component1
MSI2: HKEY_LOCAL_MACHINE\SOFTWARE\<CompanyName>\ABC\Component2
MSI3: HKEY_LOCAL_MACHINE\SOFTWARE\<CompanyName>\ABC\Component3


MSI1 uninstall, registry key Component1 not removed.
MSI2 uninstall, registry key Component2 not removed.
MSI3 uninstall, registry key Component3 removed..

Irrespective of order, the registry key is removed only for last uninstall. Changing registry install behavior "install if absent, uninstall if present" not helped.

Is there any way, or only CustomAction is the solution?

推荐答案

最后我得到了解决方案:



在ISM模板中,我通过脚本动态更改产品GUID。但是MSI包GUID,组件GUID没有被更改,并且对于所有3个MSI保持相同。看来,组件GUID在Windows MSI数据库中称为全局系统。因此,当在系统上安装MSI1,MSI2,MSI3时,即使产品ID不同,它们的ISRegistryComponent GUID仍保持相同并被视为共享,因此不会被删除。只有当Windows MSI计数器达到该组件的零时才会被删除。因此,在上次MSI卸载时,注册表将被删除。



为所有MSI提供不同的组件GUID,解决了注册表问题。
Finally I got the solution:

In ISM template, I am dynamically changing the Product GUID through script. But the MSI package GUID, Component GUID not being changed and remains same for all 3 MSI. It seems that, component GUID referred as global on the system in Windows MSI database. So when installed MSI1, MSI2, MSI3 on the system, even though product id is different, their ISRegistryComponent GUID remains same and considered as shared and so not get removed. It is only get removed when Windows MSI counter reaches to zero for that component. So on last MSI uninstall, the registry get removed.

Providing different component GUID for all MSI, resolves the registry issue.


这篇关于卸载:注册表项不会被删除。 (Installshield 2010)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆