Setting a property from a dialog - 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!

aunitt
Posts: 9
Joined: Thu Jul 13, 2006 12:51 pm

Setting a property from a dialog

Hi,

What I want to be able to do is insert a dialog to prompt the user to enter some text and then store this as a registry value for the application to read later on.

I've created the registry key and a property to store it's value and I've created a dialog to capture the input, and I'm trying to set the property there when a button is pushed. However I don't really understand the documentation and how to get that to work.

I've tried following the steps at http://www.advancedinstaller.com/user-g ... perty.html but I don't really understand when I need to do. I've set up a published SetProperty event but what should the arguments be?

Thanks

Ashley
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

When you create your registry value use a property for its data (property defined in the "Install Parameters" page).
Switch to "Dialogs" page and create an Edit control. Under the "Next" or "Install" button create a "Published Event" choose "SetProperty" from the "Name" combo box.
In the "Edit Control Event" dialog use following options:
1. Name: [PROPERTY1]
2. Argument: [PROPERTY2]
3. Condition: leave empty
PROPERTY1 is the property defined in the "Install Parameters" page and PROPERTY2 is the Edit control property.

Regards,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
aunitt
Posts: 9
Joined: Thu Jul 13, 2006 12:51 pm

Hi Gigi,

Probably I am being really dumb, but I don't understand how I can set the name to both SetProperty and [PROPERTY1]. This is where I'm stuck.

Image

Here I have SetProperty and [PROPERTY2] but I can't enter [PROPERTY1].

Can you give me more ideas?

Thanks

Ashley
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Type in the "Name" field [PROPERTY1] instead of "SetProperty" and note that
PROPERTY1 is the property defined in the "Install Parameters".

Regards,
Gigi
________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
aunitt
Posts: 9
Joined: Thu Jul 13, 2006 12:51 pm

Hi Gigi,

Sorry I've tried that and I'm still getting nowhere. The registry value is still not being set.

Have you got some example code that we could look at or something else?

Thanks

Ashley
aunitt
Posts: 9
Joined: Thu Jul 13, 2006 12:51 pm

Okay.. I've put in a second dialog to write the value of the property and that does seem to get set.

However in the registry I am still getting the initial value of the property, not the updated value as set by the dialog box.

Sorry to be a pain, but could you give me some more ideas?

Thanks

Ashley
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Create a new property in the "Install Parameters" page. Name it MY_PROPERTY. Please make sure that when you create the registry value you choose a property (MY_PROPERTY) for its data ("Property..." button on the "Edit Registry Entry" dialog).

Now use following options in the "New Control Event" dialog:
1. Name: [MY_PROPERTY]
2. Argument: [PROPERTY2] (the edit control property)

Please let me know is you encounter any problem.

Regards,
Gigi
________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
aunitt
Posts: 9
Joined: Thu Jul 13, 2006 12:51 pm

Okay,

This is very strange. I've had exactly this set up with the property name QueueManager and the registry isn't getting updated.

I've now changed the property name all through to MY_PROPERTY and the registry gets updated.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

This is because you use a private property (QueueManager). Only public properties (written in uppercases) are available from UI Sequence to Execute Sequence.

Private properties must contain some lowercase letters.
Public properties are written in uppercase letters.
Please see this:
http://msdn.microsoft.com/library/defau ... _names.asp

Regards,
Gigi
________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”