简体   繁体   中英

How To Pass Custom Arguments To Advanced Installer 11.4

I am working with 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

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.

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. There are two main types of Windows Installer properties:

  • Private Properties (contain lower-case letters in their name, example: My_Prop)
  • Public Properties (contain only upper-case letters in their name, example: MY_PROP)

The difference between Public and Private properties consists in the way their values are being passed on. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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