Windows 10 MSI卸载失败,出现1721



我有一个使用Wix(3.10)安装脚本的Excel加载项。安装工作良好。但是,如果用户试图通过System|Apps&功能,失败时显示"此Windows安装程序包有问题。完成此安装所需的程序无法运行。"查看卸载日志,我看到的是:

Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: _BDF865EC_34B3_4B29_986C_98D6EC1A9807, location: C:WindowsInstallerMSI2FE4.tmp, command: /uninstall="C:UsersWindows10AppDataLocalmyCompanymyProductmyAddin.dll" /privileges=user 

它犹豫不决的行动是:

<CustomAction Id="_BDF865EC_34B3_4B29_986C_98D6EC1A9807" BinaryKey="adxregistrator_exe" Execute="deferred" ExeCommand='/uninstall="[TARGETDIR]$(var.myProject.TargetFileName)" /privileges=user' Impersonate="yes" />

但是,如果我重新运行安装程序并选择"删除",它会很好地卸载。此外,如果我从命令行运行卸载(使用该产品注册表项中的msiexec命令),它也会很好地卸载。

此外:

  • 这种情况只在Windows 10中发生。旧版本的Windows可以
  • 我已经在几台机器上进行了复制,包括一个新安装
  • 我有一个较旧的安装程序(VS2010安装程序项目),该安装程序也会出现问题
  • 我在不同的海拔高度尝试过UAC,没有区别
  • 我在这里看到了其他关于将Impersonate设置更改为"no"的帖子,没有区别

在我看来,新的Windows应用程序&功能应用程序,但我尚未在Microsoft论坛上找到任何内容。

更新:

一位Wix用户发布了这样的消息:新的Windows 10应用程序和功能的DTF Bug。此外,我们尝试了各种命令(认为这是UAC问题),但都不起作用,甚至"内置"Windows命令也会失败。

我遇到了同样的问题,最终得到了这个解决方案:Win 10应用程序&功能卸载程序检查WindowsInstaller注册表值,并在不存在该值时正常运行

1) 定义自定义操作

<CustomAction Id="DeleteWindowsInstallerValue" Return="ignore" Directory="TARGETDIR" Execute="deferred" Impersonate="no"
ExeCommand= "reg.exe DELETE HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall[ProductCode] /v WindowsInstaller /f" />

2) 安排InstallExecuteSequence 中的操作

<Custom Action="DeleteWindowsInstallerValue" Before="InstallFinalize"/>

Honza

最新更新