Send Install Folder as Command Line Parameter - 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!

lekfir
Posts: 130
Joined: Sun Feb 15, 2009 5:26 pm

Send Install Folder as Command Line Parameter

Hi,
How can I send to my MSI (Silently installed) a command line parameter of the target insstall folder (APPDIR) ?
Thnaks!
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Send Install Folder as Command Line Parameter

Hello,

You can achieve this using the following command line:

Code: Select all

msiexec.exe /i your.msi APPDIR="<your path here>"
Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
lekfir
Posts: 130
Joined: Sun Feb 15, 2009 5:26 pm

Re: Send Install Folder as Command Line Parameter

Thanks.
I am writing an application that runs the msi.
The application checks for internet connection, installs the pre requisites (Doesn't use the feature in Advanced Installer) and at the end runs the MSI.
Before installing it asks the user for settings and based on the answers, it calls the msi.

For example, "What is the folder target?"
One of the settings is a check box that allows the user to place a shortcut of my application on the desktop.
How can I pass such parameter to msi?


Thnaks!
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Send Install Folder as Command Line Parameter

Hi,

You can try using the same method that Gabriel recommended above, only that you change the property name. For desktop shortcut display you can use AI_DESKTOP_SH property. Here is an example:

Code: Select all

msiexec.exe /i your.msi AI_DESKTOP_SH="1"
This will make the MSI installation to create a shorcut on the desktop with the condition that the ShortcutsDlg dialog is added to the MSI.

Another solution would be for you to create a shortcut to an external file and then condition its component using a property which you can set like in the precedent examples. The property can be created in the Install Paramters page.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lekfir
Posts: 130
Joined: Sun Feb 15, 2009 5:26 pm

Re: Send Install Folder as Command Line Parameter

Thanks you all!

Return to “Common Problems”