取消MSI安装 [英] Canceling MSI installation

查看:83
本文介绍了取消MSI安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好.

我有一个问题,只有在安装了Framework 2.0 SP2的情况下才允许安装应用程序. MSI启动条件仅检查框架的版本,但不检查 检查ServicePack.我编写了执行此操作的代码,并将其放置在重写的Install方法中.

I have a problem to allow the installation of an application only if the Framework 2.0 SP2 has installed. MSI launch conditions check only version of the Framework, but don't check the ServicePack. I wrote code which does it and placed in the overrided Install method.

如果不满足检查条件-给出消息并取消安装.我发现只有一种方法-抛出InstallException.但是我认为这种方法是不正确的,因为取消 安装的事件记录在系统事件日志中.

如果启动条件不满足,谁能提出正确的终止方法并回滚安装?

If the check conditions are not met - to give the message and cancel the installation . I found only one way - throw InstallException. But I think that this method is not correct, as the cancelling of the installation is recorded in the system event log.

Can anyone suggest the correct method of termination and rollback the installation if launch conditions is not satisfied?

推荐答案

如果您仅限于使用System,我认为这是您可以做的最好的事情. Configuration.Install.Installer.这些安装程序"并不是很想互动...

I think this is the best you can do if you are limited to working with System.Configuration.Install.Installer.  These "installers" aren't really intended to be very interactive...

您尚未确切说明用于生成MSI的工具.您可能想要使用一种可提供更大灵活性的安装程序工具.

You haven't said exactly what tool you used to generate the MSI.  You might want to pursue an installer tool that gives you more flexibility.

 


这篇关于取消MSI安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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