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!

d_smolienko
Posts: 2
Joined: Fri Dec 22, 2017 7:30 am

Empty properties in command line(prerequests)

Hello!
I have installed 14.5.1 version of Advanced Installer. On my form there is a checkbox value of which is used in feature-based prerequisites.
I wrote in install command lines something like this:

SRS_PORT=[SRSPORT] SRS_ADDRESS=[SRSADR] INSTALL_CREP="[PR]" /L*V "C:\Users\d_smolienko\example.log"

It's in log fili:

MSI (c) (9C:84) [17:48:03:258]: Command Line: SRS_PORT=218 SRS_ADDRESS=0.0.0.1 INSTALL_CREP=CURRENTDIRECTORY="C:\Windows\system32" CLIENTUILEVEL=0 CLIENTPROCESSID=6044


I found a similar problem on the forum. You advise to use curly brackets ({ }). I wrote {INSTALL_CREP="[PR]"} but it did not help.
Log file:

MSI (c) (A4:FC) [09:27:17:162]: Command Line: SRS_PORT=218 SRS_ADDRESS=0.0.0.1 CURRENTDIRECTORY=C:\Windows\system32 CLIENTUILEVEL=0 CLIENTPROCESSID=1956

What am I doing wrong?

Sorry for my english.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Empty properties in command line(prerequests)

Hello and welcome to our forums,

When you use the following syntax:

Code: Select all

 {INSTALL_CREP="[PR]"}
the "INSTALL_CREP" parameter will be omitted from command line at install time if its value will be empty, more exactly if the checkbox will be unchecked, thus the "PR" property will be empty. And from what I see in your quote log line

Code: Select all

MSI (c) (A4:FC) [09:27:17:162]: Command Line: SRS_PORT=218 SRS_ADDRESS=0.0.0.1 CURRENTDIRECTORY=C:\Windows\system32 CLIENTUILEVEL=0 CLIENTPROCESSID=1956 
the "INSTALL_CREP" parameter is not set anymore in the prerequisite command line.

Do you need to get another behavior? If so, please give us more details about this.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
d_smolienko
Posts: 2
Joined: Fri Dec 22, 2017 7:30 am

Re: Empty properties in command line(prerequests)

I need to get space after equality.
Like this:
MSI (c) (9C:84) [17:48:03:258]: Command Line: SRS_PORT=218 SRS_ADDRESS=0.0.0.1 INSTALL_CREP= CURRENTDIRECTORY="C:\Windows\system32" CLIENTUILEVEL=0 CLIENTPROCESSID=6044

In genera, I need to send empty value of checkbox into msi installer which is launched by my installer

I can do it from windows command line and it's work, but I don't know how do it from comand line in Prerequisites Page.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Empty properties in command line(prerequests)

Hello,

To do so you can use an auxiliary property (CHECKBOX_STATE) which will be set to empty space when your "PR" checkbox property is not checked. Here are the settings you could configure into your project:

1. go to "Install Parameters" page and define a new property like this:
  • Name: CHECKBOX_STATE
    Value: <empty space>
2. go to "Dialogs" page and select your check box control
3. from "Properties" right pane set the "Selected" attribute to "False"
4. in the "Published Events" list add two events configured like so:
  • Control Event: Set installer property value
    Property: CHECKBOX_STATE
    Argument: [PR]
    Condition: PR

    Control Event: Set installer property value
    Property: CHECKBOX_STATE
    Argument: "<empty space>"
    Condition: NOT PR
5. go to "Prerequisites" page and use the following syntax:

Code: Select all

{INSTALL_CREP="[CHECKBOX_STATE]"}
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”