简体   繁体   English

查询reg msiexec静默安装

[英]Query reg msiexec silent install

When we do msiexec.exe /i myApp.msi /q 当我们执行msiexec.exe / i myApp.msi / q

I know we end up doing a silent installation, but from where does the installer get the values of the fields that have to be populated and are needed for the installation to happen. 我知道我们最终将进行静默安装,但是安装程序将从何处获取必须填充的字段的值,安装完成才需要这些字段的值。 For instance, there may be a few fields or parameters like username, password, etc, which we might obtain from the user during a regular install. 例如,可能会有一些字段或参数,例如用户名,密码等,我们可能会在常规安装期间从用户那里获得这些字段或参数。

In a silent install, the installer gets these from an input file. 在静默安装中,安装程序将从输入文件中获取这些内容。 Where is this input file stored? 此输入文件存储在哪里? or how does it get these values? 或如何获得这些值?

I am trying to do a silent install and am facing issues because it is picking up a wrong value for a particular attribute...which I dont how its picking up. 我正在尝试进行静默安装并遇到问题,因为它为特定属性选择了错误的值...我不知道如何选择它。

Any pointers would be appreciated. 任何指针将不胜感激。

The parameters you refer to are called "Properties" in the Windows Installer. 您所引用的参数在Windows Installer中称为“属性”。 So, if you run silently, the properties will have their default value. 因此,如果您以静默方式运行,则属性将具有其默认值。 If you specify a value in a Property element that will be used. 如果在要使用的Property元素中指定一个值。 If you have SetProperty or other CustomAction elements those can change the value of the properties. 如果您具有SetProperty或其他CustomAction元素,则可以更改属性的值。 You can also provide properties on the command-line to the install like so: 您还可以在命令行中为安装提供属性,如下所示:

msiexec /i path\to\your.msi /q PROPERTY1=value PROPERTY2="my other value" PROPERTY3=2

It is also important to note that the Windows installer does not store property values that are changed during the install. 同样重要的是要注意Windows安装程序不会存储在安装过程中更改的属性值。 You'll want to check out the Remember Property Pattern for that. 您将需要查看“ 记住属性模式 ”。

MSI's do not natively use input files to get values. MSI本身不使用输入文件来获取值。 If that's your story, you had to implement custom actions to make that happen. 如果这是您的故事,那么您必须实施自定义操作才能实现这一目标。

Typically you'd use a Secure Custom Property ( A public property that is listed in the SecureCustomProperties property where a public property is one that is in all CAPS. ) passed at the commandline. 通常,您会使用在命令行中传递的安全自定义属性(SecureCustomProperties属性中列出的公共属性,其中公共属性是所有CAPS中的一个公共属性。)

msiexec /i foo.msi /qn USERNAME=Bob PASSWORD=1Password

Typically you'd have custom dialogs, controls and custom actions in the UI and Execute sequence to handle validation of the inputs. 通常,您会在UI和执行序列中具有自定义对话框,控件和自定义动作,以处理输入的验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM