如何仅在安装(而不是卸载)中执行自定义操作

编程入门 行业动态 更新时间:2024-10-26 10:29:52
本文介绍了如何仅在安装(而不是卸载)中执行自定义操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我敢肯定这很容易,但我遇到了一些困难.我有一个自定义操作,可以在安装时执行不同的(非 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

更多推荐

如何仅在安装(而不是卸载)中执行自定义操作

本文发布于:2023-11-03 14:38:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555383.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   而不是   操作

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!