简体   繁体   English

如何将自定义 Arguments 传递给 Advanced Installer 11.4

[英]How To Pass Custom Arguments To Advanced Installer 11.4

I am working with Advanced Installer 11.4.我正在使用 Advanced Installer 11.4。

I want to ask for an argument and update a registry key with the installer.我想要求一个参数并使用安装程序更新注册表项。

I see this post, but this is not available in 11.4我看到了这篇文章,但这在 11.4 中不可用

https://stackoverflow.com/questions/45195317/advanced-installer-how-to-pass-arguments-to-executable

The end result would be..最终结果将是..

myInstaller.msi /qn MyArg="abc123"

MyArg is a Property binded to the proper registry key. MyArg 是绑定到正确注册表项的属性。

You can use the command line that you've possed with one small change.您可以使用您已经拥有的命令行,只需稍加改动即可。 Use capital letters for the name of your property:使用大写字母作为您的财产名称:

myInstaller.msi /qn MYARG="abc123"

Windows Installer properties are global variables that Windows Installer uses during an installation. Windows 安装程序属性是 Windows 安装程序在安装期间使用的全局变量。 There are two main types of Windows Installer properties: Windows 安装程序属性主要有两种类型:

  • Private Properties (contain lower-case letters in their name, example: My_Prop)私有属性(名称中包含小写字母,例如:My_Prop)
  • Public Properties (contain only upper-case letters in their name, example: MY_PROP)公共属性(名称中仅包含大写字母,例如:MY_PROP)

The difference between Public and Private properties consists in the way their values are being passed on. PublicPrivate属性之间的区别在于它们的值被传递的方式。 Only the value of a Public Property is passed on from the Wizard Dialogs Stage (in which the dialogs are showed) to the Install Execution Stage (in which the system is modified).只有公共属性的值从向导对话框阶段(显示对话框)传递到安装执行阶段(修改系统)。

Therefore, make sure that you use a Public Property for an UI control (Editbox, Combobox etc) if you want its value to be available in the InstallExecute Sequence (for instance, if the value of this Property is written in the registry, .ini file), otherwise you will get the default value assigned to this property.因此,如果您希望它的值在 InstallExecute Sequence 中可用(例如,如果此属性的值写入注册表,.ini文件),否则您将获得分配给此属性的默认值。

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

相关问题 如何将命令行参数传递给 MSI 安装程序 - How to Pass Command Line Arguments to MSI Installer 如何在Advanced Installer中加密连接字符串(13.3)自定义操作 - How to encrypt your Connection String in Advanced Installer (13.3) Custom Action 如何调用高级安装程序中附加的.exe文件的先决条件C#自定义操作 - how to Invoke .exe file attached inside Advanced installer Prerequisite C# custom action 如何将当前的 installer.msi 名称传递给自定义操作? - How to pass current installer.msi name to custom action? 使用WiX将参数传递给Windows Service的安装程序类 - Pass arguments to Installer Class of Windows Service with WiX 如何将安装目录从安装程序传递到自定义操作? - How do I pass installation dir from the installer to a custom action? 通过高级安装程序中的自定义操作将文件放入APPDIR - Place a file in APPDIR from a Custom Action in Advanced Installer 通过installutil安装长期运行的服务时如何将参数传递给Configuration.Install.Installer - How to pass arguments to `Configuration.Install.Installer` when installing a long-running service through `installutil` 如何在静默安装程序中调用installer.ini参数? - How I can call the installer.ini arguments in a silent installer? Win / Forms:如何在Advanced Installer中包括依赖项(DLLS) - Win/Forms: How do I include Dependencies (DLLS) in Advanced Installer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM