Vista中如何防止程序可能已被卸载的消息?

发布于 2024-08-09 23:11:42 字数 1062 浏览 4 评论 0原文

在 Vista 或更高版本的 Windows 中卸载我们的应用程序(Web 服务器)后,会出现一个错误消息框,显示“尝试卸载我的应用程序时发生错误”。它可能已经被卸载。您想从程序和功能列表中删除我的应用程序吗?并且有“是”和“否”按钮。这种情况发生在我的安装程序关闭之后和系统重新启动之前。 (重新启动后,应用程序不再位于 ARP 列表中,因此错误消息是不必要的。)

这可能看起来与 这个,但是消息框不同,并且只有在满足以下所有条件时才会发生:

  • 计划和功能 控制面板打开
  • 安装程序卸载 IIS(如果我们的安装程序一开始没有安装 IIS,则不会完成,有其他网站使用它,或者用户在给出选项时选择不卸载它)
  • 用户同意,在我们的安装程序,立即重新启动。

我尝试将一个值放入 HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted 下的注册表中,其中包含控制面板运行的安装程序副本的路径(它是基于InstallShield 技术早于 Windows 安装程序)。虽然注册表修复可以防止在执行添加/删除组件安装(或者使用新的白话,修改安装)时出现的 UAC 消息,但它并不能阻止这种情况。

我需要一种方法来防止错误消息,因为当权者将其视为发布阻止程序。有一些解决方法可以阻止该消息(包括不卸载 IIS),但上级对这些解决方法不感兴趣;他们希望解决实际问题。 (下一版本的安装程序将使用最新的技术,所以值得庆幸的是,这是一次令人头痛的事情。)

编辑:经过一些实验,我发现是 IIS 的卸载造成了一些问题。使控制面板在我们的安装程序退出并启动系统重新启动时显示错误消息。 (我们的安装程序通过带有 /norestart 选项的 pkgmgr.exe 命令行卸载 IIS - 一旦准备就绪,我们的安装程序就会在这种情况下负责重新启动。)

After uninstalling our application (a web server) in Vista or newer Windows, an error message box appears that says, 'An error occurred while trying to uninstall My App. It may have already been uninstalled. Would you like to remove My App from the Programs and Features list?'; and there are 'Yes' and 'No' buttons. This happens right after my installer closes down and before the system reboots. (After the reboot, the application is no longer in the ARP list, so the error message is unnecessary.)

This may seem to be a duplicate of this, but the message box is different, and it only happens when all of the following conditions are met:

  • the Programs & Features control panel is open
  • the installer uninstalls IIS (not done if our installer did not install IIS in the first place, there are other Web sites using it or the user opts out of uninstalling it when given the option)
  • the user agrees, in our installer, to rebooting right away.

I've tried putting a value into the registry under HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted with the path to the copy of the installer that the control panel runs (it's a legacy installer that's based on InstallShield tech that predates Windows installer). While the registry fix works for preventing the UAC message that used to come up when doing an add/remove components install (or, to use the new vernacular, a Modify install), it doesn't prevent this one.

I need a way to prevent the error message, as the powers that be are treating it as a release blocker. There are workarounds that prevent the message (including not uninstalling IIS), but the higher ups aren't interested in the workarounds; they want the actual problem fixed. (The next version's installer will be using up to date tech, so thankfully, this is a one time headache.)

Edit: After doing some experimentation, I discovered that it's the uninstallation of IIS that's doing something to make the control panel bring up the error message when our installer exits and initiates a system reboot. (Our installer uninstalls IIS by way of a pkgmgr.exe command line with the /norestart option -- once it's ready for it, our installer takes care of the reboot in that case.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦里°也失望 2024-08-16 23:11:42

这似乎是 Windows 的错误:http://support.microsoft.com/kb/2002473/

This appears to be bug with Windows: http://support.microsoft.com/kb/2002473/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文