开发者

Visual Studio Setup Project won't uninstall old version fully

开发者 https://www.devze.com 2023-03-19 12:58 出处:网络
Hopefully I can explain this clearly: I have a Visual Studio Setup Project (C++), my current build scripts do the following:

Hopefully I can explain this clearly:

I have a Visual Studio Setup Project (C++), my current build scripts do the following:

  • update the version numbers
  • update the PackageCode
  • update the ProductCode

This has worked without any problems in the past (approximately 开发者_Python百科20 releases).

I just did a new release where a custom action was removed (which was included in most of the previous releases). My build process was the same as above.

Now when I install I get a duplicate entry in Windows Add and Remove Programs.

ie:

  • previous version was 1.0.6.2 and is installed on the computer.
  • I then install new version 1.0.7.0 (has custom action removed)

Add and remove programs lists 1.0.6 and 1.0.7.

Any idea what I need to do to fix this? I expect what is happening is that the new version is causing the uninstaller for 1.0.6.2 to run, but is not getting it to remove the FeatureComponents that were removed as part of 1.0.7.0.

Is there a way to force their removal?


Make sure that both versions have the same installation type (per-user or per-machine). This is controlled through ALLUSERS installer property or InstalAllUsers setup project property.

Also, they should use the same UpgradeCode. You can check it in Property table by opening the MSI files with Orca.

If these conditions are met and the problem persists, try creating a verbose log and see what happens when FindRelatedProducts and RemoveExistingProducts actions are executed.

0

精彩评论

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