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

问题描述

我敢肯定这很容易,但是我对此很难过.我有一个自定义操作,该操作在安装时执行不同的(非msi)安装程序.不幸的是,我注意到它还在UNinstallation上执行安装程序!

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

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

09-05 23:41