VS Setup Project: Uninstall other component on install

我的梦境 提交于 2019-12-05 06:02:51

If you don't need to actually run the uninstall of the other component, you could use a Custom Action to remove files/folders you intend to replace.

Using a Custom Action will force you to do all the clean up actions the Uninstaller would do for you.

Is it that you're replacing something or are you just trying to uninstall something as a result of installing something entirely different?

MSDN Custom Action Walkthrough

I have also read a few articles from Phil Wilson that have been helpful with Custom Actions:
Phil Wilson on Custom Actions

I ran into a similar problem that required several installs to run together and could find no way to run MsiExec recursively. The solution I used was to bundle the installer with a script that would run MsiExec once to install/uninstall the old package, then again to run the new installer. Clients had to run the script to install.

If you find a better way, let me know.

I think you can run uninst.exe of that program through the shell command while setup starts.....

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!