如何仅在安装(而不是卸载)中执行自定义操作 [英] How to execute custom action only in install (not uninstall)

查看:24
本文介绍了如何仅在安装(而不是卸载)中执行自定义操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我敢肯定这很容易,但我遇到了一些困难.我有一个自定义操作,可以在安装时执行不同的(非 msi)安装程序.不幸的是,我注意到它也在卸载时执行安装程序!

I'm sure this is fairly easy, but I've kind of had a hard time with it. I've got a custom action that executes a different (non-msi) installer on installation. Unfortunately, I've noticed that it also executes the installer on UNinstallation!

我已经查看了选项,但似乎无法找到如何阻止这种情况.如果有人能帮助我,我将不胜感激.

I've looked through the options but I cant' seem to find out how to stop this. If anybody could help me I would be incredibly grateful.

另外,如何设置自定义操作仅在卸载期间关闭?任何帮助都非常感谢伙计们!

Also, how do I set a custom action to go off only during UNinstall? Any help is greatly appreciated guys!

推荐答案

为操作添加条件,使其仅在安装期间触发,而不在卸载期间触发.

Add a condition on the action so it's only triggered during installation, not uninstallation.

操作仅在安装期间运行

NOT Installed AND NOT PATCH

操作在安装和修复期间运行

Action runs during Install and repair

NOT REMOVE

仅在初始安装时运行:

NOT Installed

在初始安装或选择修复时运行.

Run on initial install or when repair is selected.

NOT Installed OR MaintenanceMode="Modify"

要仅在卸载期间运行操作,请使用以下条件:

To only run an action during uninstall use the following condition:

REMOVE~="ALL"

仅在升级期间运行操作:

To only run an action during upgrade:

Installed AND NOT REMOVE

这篇关于如何仅在安装(而不是卸载)中执行自定义操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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