VS 安装项目:安装时卸载其他组件 [英] VS Setup Project: Uninstall other component on install

查看:53
本文介绍了VS 安装项目:安装时卸载其他组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个 Visual Studio 安装项目.我想通过安装我的组件从系统中卸载另一个组件.另一个组件是从我自己使用 Visual Studio 创建的设置中安装的.

I am creating a Visual Studio Setup project. I want to un-install another component from the system from the install of my component. The other component is installed from my own setup created using Visual Studio.

目前,当我从组件的安装操作中调用其他组件的卸载时,我收到错误代码:1618(另一个 MSI 已在运行).

Currently when I am calling the un-install of the other component from the install action of the component I get the error code: 1618 (another MSI already running).

有人可以建议我解决这个问题的替代方法吗?

Could anyone suggest me an alternative way to solve this problem?

推荐答案

我遇到了一个类似的问题,需要多个安装一起运行,但找不到递归运行 MsiExec 的方法.我使用的解决方案是将安装程序与脚本捆绑在一起,该脚本将运行一次 MsiExec 来安装/卸载旧包,然后再次运行新安装程序.客户端必须运行脚本才能安装.

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.

这篇关于VS 安装项目:安装时卸载其他组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆