mmadden
Posts: 22
Joined: Fri Jun 10, 2005 6:21 pm
Location: West Conshohocken, PA

Some Registry key values from AI variable not getting set

I cannot get a value to update in the registry-even though it displays properly in a dialog. Other values from the same dialog update fine.

I have two custom dialogs (Ent ver) that collect several bits of info from the human installer. The goal is to set an app to use a specific IP address depending on the Network the user is installing the app on (as opposed to having a separate build for each network)

I have two static Install Parameters set;
ISSP01_AuditServerIP = 192.168.1.1
ISSP02_AuditServerIP = 10.10.10.1

The first custom dialog contains a radio button group called ID_ISSP_SYSTEM_ID
The two radio button values are ISSP01 and ISSP02
I also have an Edit Box that accepts input from the user at runtime, called ID_AssetTag.

The second custom dialog is sequentually immediately after the first.
I have a 'Static Text' control which is set to show the value ID_ISSP_SYSTEM_ID selected on the previous dialog. This works, at runtime it displays either ISSP01 or ISSP02 depending on the radio button chosen.

I also have an 'Edit Box' control called IDAuditServerIPEdit. This is where I want to display the appropriate IP address depending on the radio button choice.
I did this by adding two 'Init' Control Events on the second dialog.
Name: IDAuditServerIPEdit
Argument: [ISSP01_AuditServerIP]
Condition: ID_ISSP_SYSTEM_ID = "ISSP01"
and
Name: IDAuditServerIPEdit
Argument: [ISSP02_AuditServerIP]
Condition: ID_ISSP_SYSTEM_ID = "ISSP02"

At runtime this works properly.
For example-the dialog may look like this:
ISSP Lan ID: ISSP02
Audit Server IP Address: 10.10.10.1

It will update properly even if I go back to the previous dialog and change the option. :D

Thats it.
I have three registry values set for this install using the default registry settings:

Name: IP_ISSP01
Data: [ISSP01_AuditServerIP]
~
Name: Asset_Tag
Data: ID_AssetTag
~
Name: ISSP-SystemID
Data: ID_ISSP_SYSTEM_ID

The first entry is my test to ensure that I can store the IP address at all. (from the static Install Param.)

The second is the variable collected from the user via Edit Box on the first dialog.

The third, (my problem child)(calculated via the Init Event process) is not created at all. No Reg Value Name or Value Data.

There is no difference in the AI settings of any of the registry settings. They are all in the same key. Two contain essentially the same data (an IP address). All REG_SZ.

I figure the ID_ISSP_SYSTEM_ID variable was set correctly as it displayed correctly on the second dialog.

I even added a custom DoAction, UpdateMSIEditControls Publish event on the Next button of the second dialog. No change. Although I did not have to do this for the ID_AssetTag Edit Box/Registry update settings on the first dialog box to work.

I also tried to create an Environment Variable instead of a Reg entry. Same-no go.

The IDAuditServerIPEdit Edit Box is also intended to allow the human installer to override and manually enter an IP address if it were necessary, but that is secondary to getting the predefined IP addresses recorded. I would expect it to work though as the ID_AssetTag Edit Box worked as expected.

Anyway, I am at a loss for why this won't work and have spent many hours on it.

Help! :cry: [/i]
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

The problem is because you use a private property to store the IP address. Private properties are not modified from UI Sequence to Execute Sequence. Read more here:
http://msdn2.microsoft.com/en-us/library/aa371245.aspx

So you need to use a public property (in upper case: [ISSP01_AUDITSERVERIP]). Same for the ID_AssetTag property.

Regarding the second/third registry keys if you want to use the values stored in the properties (ID_AssetTag, ID_ISSP_SYSTEM_ID) for the registry values enclose them into brackets.

Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/
mmadden
Posts: 22
Joined: Fri Jun 10, 2005 6:21 pm
Location: West Conshohocken, PA

That was it!!
I guess I never knew about the public - private property, and I especially did not know that case would have made a difference in my variable names. I will have to read more about this.

I renamed my failing entry to ALL CAPS and it works now!!!
:lol:

What I still don't understand though is my other variable ([ISSP01_AuditServerIP]), that did make it into the registry fine, is not in ALL CAPS. Hmmm, Is that because I set it in the Install Parameters sectio that its made public, regardless of the CAPS??

About the use of brackets ([]). I did have those on my actual registry entry references. I just forgot to include them in my post, but thanks for picking up on that. I suppose if I didn't have them, I would also have problems. I actually used the Property Picker to choose them so they were automatically added.

Thanks for the quick support. I posted before I went to bed and whalaa-in the morning I have a resolution to a show stopper... :shock:
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
What I still don't understand though is my other variable ([ISSP01_AuditServerIP]), that did make it into the registry fine, is not in ALL CAPS. Hmmm, Is that because I set it in the Install Parameters sectio that its made public, regardless of the CAPS??
No, properties written in lower cases are always interpreted as private properties and their values are not changed from UI Sequence to the Execute Sequence. In the registry will always go the default value you have specified in the "Install Parameters" page.

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

Return to “Common Problems”