Command Line parameters

Having trouble running Advanced Installer? Got a bug to report? Post it all here.

Command Line parameters

Postby gsimpson » Fri May 11, 2012 7:14 pm

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
gsimpson
 
Posts: 12
Joined: Sat Dec 31, 2011 8:13 pm

Re: Command Line parameters

Postby Daniel » Mon May 14, 2012 9:35 am

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
http://www.advancedinstaller.com/
Daniel
 
Posts: 2070
Joined: Mon Apr 02, 2012 1:11 pm


Return to Common Problems

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests