Improper dialog object behavior.

Got a problem you cannot solve? Try here.
slang
Posts: 21
Joined: Tue Mar 14, 2006 7:36 am

Improper dialog object behavior.

Postby slang » Tue Mar 28, 2006 6:32 pm

Unless I'm doing something wrong, I'm finding that certain dialog objects return a null value unless the user interacts with the associated control.

In the Registration dialog, for example, the Company edit control receives information from Workstation Company and writes values to the USERCOMPANY variable. The Company edit control does indeed properly display the Workstation Company in the UI. However, if the Company edit control is left unmodified in the UI, the USERCOMPANY variable is null when the dialog exits. (This can be quickly replicated by placing a MessageBox displaying $USERCOMPANY$ after the Display Dialog: registration command). If the Company control is modified in the UI (e.g., add a space to the end of Workstation Company), then the USERCOMPANY variable is properly initialized when the dialog exits.

The same pheonomon occurs with the rzCheckBox control. If the checkbox is not changed in the UI, the value returned is empty. If the checkbox is changed in the UI, then a value of TRUE or FALSE is returned. I would think that the value returned should always be either TRUE or FALSE, whether or not the user has interacted with the rzCheckBox control.

I can program around the rzCheckBox control returning a null value but I have no way of capturing Workstation Company when the user doesn't modify the control.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Mar 29, 2006 12:26 am

Cannot reproduce...not to say it doesn't exist, but here's what I tried:

On the first line of the setup script:
MessageBox: USERCOMPANY, $USERCOMPANY$

On the line right before: "label: Setup Type"
MessageBox: USERCOMPANY, $USERCOMPANY$

I didn't change the edit field in the UI, or even tab to it/click it.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

slang
Posts: 21
Joined: Tue Mar 14, 2006 7:36 am

Postby slang » Wed Mar 29, 2006 5:20 pm

That's odd. Re-ran a test doing exactly what you did. Still getting null value. I also tried adding a second edit control to the registration dialog and initializing it also with Workstation Company. I also added an edit control to the readme dialog, thinking perhaps the registration dialog became corrupt. Same results. Ran tests on both XP and win2K.

Is it possible that there is an enviornmental difference? It isn't a matter of locating the data since it always properly displays in the edit control (where do you get Workstation Company from? - can't find it in the registry). For some reason, it doesn't get posted back to the USERCOMPANY variable. Can't be the USERCOMPANY variable since the same problem occurs with a user-defined variable.

The odd thing is that the problem does not occur with USERNAME, which is used in the same dialog but is initialized from Workstation User. It appears to be related to the use of Workstation Company as a source for the control text.

Were you able to do a test with the rzCheckBox control? - appears to be a similar problem. Null value returned unless user clicks the checkbox.

jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Postby jimo » Wed Mar 29, 2006 5:35 pm

I can not reproduce either, I ran a similar test on a VMWare XP machine with SP2,
I used the runtime debug plugin before and after the registration dialog and USERCOMPANY had the same info in both places just by clicking through the dialog.

I personally haven't tested the check box.
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com

slang
Posts: 21
Joined: Tue Mar 14, 2006 7:36 am

Postby slang » Wed Mar 29, 2006 10:58 pm

I think I know why I'm getting different results than you. When I installed windows xp, I did not specify a company name. So technically, null value in UserCompany is correct. But the Company control has a company name in it. Turns out to be the value that I placed in Publisher Name in the IA Add-Remove Programs section. When I blank out Publisher Name, then the Company control displays a null value.

It looks like Publisher Name is being used as a default value when Workstation Company is null. I can't see why the user would want Publisher Name as a default for the user's company name.

Is there a way I can obtain Workstation Company from the registry? If so, then I could just use that as a default value for Company.text in the registration dialog.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Mar 29, 2006 11:47 pm

I believe the value is already being read from the registry...
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

jtjohnson
Posts: 15
Joined: Wed Jun 21, 2006 12:06 pm

Postby jtjohnson » Wed Jun 21, 2006 1:03 pm

I ran into the same issue as well. Putting the following script before displaying the registration dialog fixes the problem for me (using IA Studio v5.3)

Code: Select all

Get System Setting Licensed Company (Text) into USERCOMPANY
if Variable USERCOMPANY Equals
 Set Variable USERCOMPANY to 
end


Line 2 compares USERCOMPANY to no value, line 3 sets USERCOMPANY to a single space.

Cheers,

James


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 178 guests