开发者

How to prevent program may have been uninstalled message in Vista?

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 diffe开发者_JAVA技巧rent, 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.)


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜