Mandatory public msi 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!

jte
Posts: 4
Joined: Wed Apr 14, 2010 2:58 pm

Mandatory public msi parameter

Hi all,

I made a simple MSI with Advanced Installer (trail version), and added a public install parameter to the project.
Now I want that the MSI only start the install if a value is given to the parameter.

msiexec.exe /i <app.msi> PARAMETER="value" -> start install
msiexec.exe /i <app.msi> -> exit install

I looked at custom actions, Installinitialize, but no luck so far. Can anyone give me a push to the right direction?

Kind regards
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Mandatory public msi parameter

Hello,

Simply go to the Launch Conditions page->Custom Launch Conditions tab. Create a new launch condition. In the condition field write PARAMETER. In the description field write some text to be displayed when your installer has been launched without PARAMETER being set.

Build and launch.

Let me know if this helped.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
jte
Posts: 4
Joined: Wed Apr 14, 2010 2:58 pm

Re: Mandatory public msi parameter

He Gabriel,

I tried that already, but with no luck so far.
Maybe it has to do with the way I created the parameter.

In the section Install Parameters, I create a parameter called CUSTOMER with default value (mandatory!)
So MsgBox Session.Property("CUSTOMER") gives a value, and the condition is alway's true, with or without parameter
from msiexec.exe ... CUSTOMER="....

Kind regards,
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Mandatory public msi parameter

Hello,

You could do a specific check in the launch condition:

Code: Select all

CUSTOMER <> "<your_default_value_here>"
It should work. Let me know if it helped.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
jte
Posts: 4
Joined: Wed Apr 14, 2010 2:58 pm

Re: Mandatory public msi parameter

Hi Gabriel,

Thanks, that did the trick :!:

Kind regards

Return to “Common Problems”