我卸载应用程序时没有删除文件时遇到问题。 我发现,有当应用被卸载的记录它会打印:WIX:产品未完全卸载(系统中的文件未被删除)
... MSI (s) (0C:84) [11:39:07:836]: Disallowing uninstallation of component: {51DB6066-AFCD-5A03-BE34-09E197799057} since another client exists
...
然后我发现通过使用WiX的工具集有一个名为DTF的API(在Wix toolset: complete cleanup after "disallowing uninstallation of component since another client exists"提到) ,以及i在LinqPad(C#声明)执行的查询:
(F4按进口命名空间和additiona参考)
//using Microsoft.Deployment.WindowsInstaller;
//using System.Linq;
// <ref>"C:\Program Files (x86)\WiX Toolset v3.9\SDK\
Microsoft.Deployment.WindowsInstaller.dll"</ref>
var client = ComponentInstallation.AllComponents
.Where (c => c.ComponentCode == "{72ED6979-0AAD-317C-A25C-AB9A121E6D30}")
.Select(c => c);
client.Dump();
有我s旧recods:
我不能删除它们使用“msiexec/x {GUID}”,因为这些产品被标记为“IsInstalled = False”。
那么如何删除这些旧记录呢?
我在注册表中找到了按名称排列的功能,并将它们从以下位置删除: [HKEY_CLASSES_ROOT \ Installer \ Features \ ...但是卸载过程仍然不会删除文件,并且日志中会显示相同的信息消息。 Theres仍然保留具有0个特性项目的ProductInstallation项目。 – Drasius