高级安装程序尝试安装已安装在 Windows 中的程序时如何选择默认选项? [英] How to choose a default option when Advanced Installer try to install a program which has been installed in Windows?

查看:39
本文介绍了高级安装程序尝试安装已安装在 Windows 中的程序时如何选择默认选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个setup.exe"安装程序,我将在自定义 Winform 程序中的 NoneUI(静默)模型中运行它.

I have a "setup.exe" install program and i will run it in NoneUI(silent) model in a custom Winform program.

在普通UI模式下,如果安装了相同版本的程序,界面会显示修改"、修复"、修复"三个选项.消除" .但我不知道安装程序在静默模式下会做什么,以及如何选择默认选项?

In the normal UI model , if the same version program has been installed , the interface will display 3 options : "modify" , "repair" & "remove" . But i don't know what installer will do in the silent model , and how to choose the default option ?

推荐答案

维护操作:我不是 100% 确定您要问什么,但让我们尝试一下.这些选项modify"、repair"和remove" 适用于已安装的产品.它们统称为维护操作".

Maintenance Operations: I am not 100% sure what you are asking, but let's try. These options "modify", "repair" and "remove" apply to products that are already installed. Collectively they are "maintenance operations".

修改是指选择要安装或卸载的安装功能(字典、SDK、帮助文档等...).换句话说,您可以添加或删除部分设置 - 在 MSI 中称为功能(请参阅下面的信息和链接).修复本质上是重新复制最初安装的文件和设置(可以调整确切的行为,它可能只恢复丢失的文件,也可能强制覆盖所有内容).移除将卸载产品.

Modify refers to selecting what features of the installation to install or uninstall (dictionaries, SDK, help documentation, etc...). In other words you can add or remove parts of the setup - in MSI known as features (see info and links below). Repair essentially re-copies the files and settings that were originally installed once more (the exact behavior can be tweaked, it might only restore missing files or it might force overwrite everything). Remove will uninstall the product.

特点:所以以上指的是你的产品已经安装的情况.然后您可以修复、移除或修改.但是,也有原始安装,您可以控制在这样的安装过程中安装哪些功能.

Features: So the above refers to the situation when your product is already installed. Then you can repair, remove or modify. However, there is also the original installation, and you can control what features are installed during such an installation.

以下是 MSI 的屏幕截图,显示了可供选择安装的功能:

Here is a screen shot of an MSI showing the features available to select for installation:

要控制静默安装时安装的功能,您可以使用 ADDLOCAL 属性通过命令行(或者您可以在转换中设置):

To control what features are installed when you install silently you can make use of the ADDLOCAL property via the command line (or you can set in a transform):

msiexec.exe /I /L*V "C:\test.log" ADDLOCAL="FeatureName,AnotherFeatureName" /QN

参数快速说明:

/I = run installation sequence
/L*V = "C:\Test.log"= verbose logging
ADDLOCAL="FeatureName,AnotherFeatureName" = Install these features locally 
/QN = run completely silently

有一整套与 ADDLOCAL - 例如 REMOVE、ADVERTISE、REINSTALL,但大多数时候 ADDLOCAL 足以选择要安装的功能.

There is a whole family of properties related to ADDLOCAL - such as REMOVE, ADVERTISE, REINSTALL, but most of the time ADDLOCAL will be enough to select what features to install.

上面的截图来自我在 superuser.com 上的一个旧答案:自动选择用于静默 MSI 安装的功能.它包含一些关于功能和静默安装的更详细的解释.

The above screenshot is from an old answer of mine on superuser.com: Automatically select features for silent MSI install. It contains some more fleshed out explanation on features and silent installation.

这里还有一个答案,描述了命令行和转换的安装和使用.它相当复杂和过度,但无论如何这里是链接:如何更好地利用 MSI 文件(请注意,这个答案在写作时发生了奇怪的转变,因此只有上半部分适用于您的主题 - 后者通常成为对 MSI 问题的奇怪讨论).

There is also an answer here which describes installation and the use of command line and transforms. It is rather elaborate and excessive, but here is the link anyway: How to make better use of MSI files (note that this answer took on a strange turn when writing, so only the top half applies to your topic - the latter became a weird discussion of MSI problems in general).

这篇关于高级安装程序尝试安装已安装在 Windows 中的程序时如何选择默认选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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