How create and execute installer with an argument? - 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!

davidalcaraz
Posts: 2
Joined: Sun Apr 18, 2010 3:41 am

How create and execute installer with an argument?

I read some topic for my question i got lose on the way...
I need to execute my installer proyect with an aditional argument, but i dont know do that on the aip proyect
c:\myinstaler.msi <MyArgument>

beside, depending of the parameter i need to do some actions into de intaller..
ex. if the argument is a letter P i need to install an xml file P.xml
if the argument is a letter C i need to install an xml file C.xml etc...

I will appreciate your help...
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: How create and execute installer with an argument?

Hi,

For launching a MSI package with custom arguments there are multiple options:
1. If you want to specify the arguments manually when launching the package you can use the MSIEXEC command line, for example:

Code: Select all

msiexec.exe /i "C:\myinstaler.msi" ARGUMENTS="P"
2. If you want to use arguments automatically you can enable the EXE bootstrapper and set them in the MSI Command Line field, for example:

Code: Select all

ARGUMENTS="P"
In this example ARGUMENTS is an installer property which can be accessed during install. You can use it to condition components in the Organization page. For example, the condition for "P.xml" can be:

Code: Select all

ARGUMENTS ~>< "P"
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidalcaraz
Posts: 2
Joined: Sun Apr 18, 2010 3:41 am

Re: How create and execute installer with an argument?

thanks for your encourge... it work well and it was easy to implement...

my secord question is similar ...
i'm launching an msi inside my proyect, i'm doing this action on custum section, so
i need to send the same ARGUMENT to the MSI that i'm laounching inside...

I'm chosing a Custom action propertiesand
MSI Data base to relative to the main package
but i dont know send the ARGUMENT...

Do yo have some idea or where can i find something about?
thanks eveybody...
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How create and execute installer with an argument?

Hello,

You can set the .msi you are trying to launch as prerequisite. The command line parameters can be set in the prerequisite's properties dialog.

Let me know if this helped.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”