Command Line parameters - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

gsimpson
Posts: 13
Joined: Sat Dec 31, 2011 8:13 pm

Command Line parameters

Greetings,

I have a question regarding command line parameters. Basically, what I want done is to create an installer that will accept them, so if the user enters a value it will use the said parameters in the installer.

1. User goes to the folder where the installer is.
2. User types "SETUP.EXE 123 abc 456 def"
3. In the installer, the values 123, abc, 456, and def are used internally.

Is this possible?

Thanks,
Greg
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Command Line parameters

Hello Greg,

In order to achieve what you want you should use public properties in your package application that will be set from command line. You can set a public property through the command line like this: PROPERTY="value".

Here is a sample command line for a .msi package (i.e Example.msi):

Code: Select all

msiexec.exe /i "<package_path>\Example.msi" PROPERTY="myValue"

Here is a sample command line for a .exe package (i.e Example.exe):

Code: Select all

"<package_path>\Example.exe" PROPERTY="myValue"

For example you can use your public properties in your package to set a shortcut argument in the Shortcut Properties Dialog. The "Arguments" field will contain your property value and will be set like this: /arg="[PROPERTY]".

If you have any questions let me know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”