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!

osherk
Posts: 41
Joined: Mon Apr 20, 2015 11:55 am

Transfer parameters from outside to the installer

Hi,

Is there a way to transfer parameters from outside to the installer?

Let's say I have an exe file to install that was created by Advanced installer - ai.exe for example, and I want the exe to do different things if I execute it in the command line like
"ai.exe /r" or if I execute it like "ai.exe /t". I need the AI to know how to get a parameter from outside ( "r" or "t" at this example), and by this parameter to behave deferentially,
for "r" it will run db script 1 and for "t" it will run db script 2. Does AI have this support?

Thanks!
Irina
Posts: 113
Joined: Mon Apr 27, 2015 11:42 am

Re: Transfer parameters from outside to the installer

Hi,

Being based on the Windows Installer technology, Advanced Installer supports command from the msiexec command line.
This means that you can set a public property through the command line for a .msi type package.
Using this public property, you can condition a certain script to be run.

For an .EXE package, please take a look on our "EXE setup file" article to check the full list of command line parameters accepted by our EXE bootstrapper.

Another solution would be to make you own wrapper application (over your ai.exe) that will accept a command line parameter like the one mentioned by you and call the embedded AI.exe with a command line which sets an installer property to your original parameter like this:

ai.exe MY_PROP="/r"

Do not hesitate to ask further questions.

Kind regards,
Irina Grosu
Ecaterina Irina Grosu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”