buri
Posts: 17
Joined: Mon Nov 25, 2013 8:59 pm

Passing values from edit box

Hi,

How do you change an installer property's value from an edit box? I've imported an xml file and want to pass a value to it based on what the user enters in the installer. How do to this is not clear to me. I've made a dialog, set up my static text and edit box, with the "Next" button selected in the designer, I click the Published Events tab, click new, select 'Set installer property value,' and from there I'm stuck. I don't see how to get to the edit control's value. Is there a certain notation I need to use in the Property field?

I've tried the Control Conditions route but that doesn't seem to be able to get to controls on the dialog either. Subscribed Events only lets me update controls when no tree item is selected. I tried searching your forum but apparently the word 'property' is too common. :P

Thanks.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Passing values from edit box

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.
How do you change an installer property's value from an edit box? I've imported an xml file and want to pass a value to it based on what the user enters in the installer. How do to this is not clear to me. I've made a dialog, set up my static text and edit box, with the "Next" button selected in the designer, I click the Published Events tab, click new, select 'Set installer property value,' and from there I'm stuck. I don't see how to get to the edit control's value. Is there a certain notation I need to use in the Property field?
You can edit the Event Options of the Set installer property custom action like that:

  • Property: MY_DEFINED_PROPERTY
    this is your property to which you want to pass the edit field value
    Argument: [EDIT_FIELD_PROPERTY] this is the value of the public property assigned to the edit field
Also, you can take a look on our Set property on button push article which may be useful to you
I tried searching your forum but apparently the word 'property' is too common.
To search on the forum, please use the upper right search, the Google Custom Search.

Please let us know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
buri
Posts: 17
Joined: Mon Nov 25, 2013 8:59 pm

Re: Passing values from edit box

Excellent! Thank you.

Being a Visual Studio guy, I was looking for a reference to the control itself. Having to look for a property of my edit box was enough to make me miss it. But, I got it now.

Thanks again.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Passing values from edit box

You're welcome.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
checkwa
Posts: 15
Joined: Wed May 14, 2014 5:38 am

Re: Passing values from edit box

Hi,

I'm newbie to Advanced Installer (11.2), im a bit confused how to use edit box, i created a custom dialog for the user to fill-in username and password during install, i assigned a default value on the edit boxes but when i compile the project into a MSI, it seems that the actual value(user fill in value) of the edit boxes is still the same as the default value. Here's how i use the edit box.

I set edit box property name as DB_UserName and DB_Password for the two edit boxes then i used these property name as a replace value in my sqlscripts. Do i need to create another property value and assign the actual value of the edit box to it? do you have a sample project for this.. thanks in advance
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Passing values from edit box

Hello and welcome to Advanced Installer forums,

This is happening because you are using a private property (contain lower-case letters in their name, example: My_Prop).
Please note that only the value of a Public Property is passed on from the Wizard Dialogs Stage (in which the dialogs are showed) to the Install Execution Stage (in which the system is modified).

So, please make sure you are using public properties (contain only upper-case letters in their name, example: MY_PROP) for the related controls.

Please take a look on the Windows Installer Properties article which may be useful to you.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
checkwa
Posts: 15
Joined: Wed May 14, 2014 5:38 am

Re: Passing values from edit box

Thanks so much! :D
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Passing values from edit box

You're welcome,

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”