I want to display a default database name in a text box on a custom dialog.
At the top of my script:
Set Persistent Variable DEFAULTDBNAME to RMSDBSQL
In the text property of the text box:
$DEFAULTDBNAME$
When I run the setup in debug mode, the text box is just blank. A watch shows that the variable is populated with "RMSDBSQL".
What am I doing wrong?
Also, I have two option buttons:
Server Authentication
Windows Authentication
The Checked property for the Server control is True and the Checked property for the Windows control is False, but when the dialog displays in debug mode, the Windows control is checked and the Server control is not checked. What is going on?
Thanks for the help.
Displaying variable values in text boxes on dialog
-
jimdalrymp
- Posts: 13
- Joined: Wed Jun 20, 2007 2:34 pm
- Location: St. Louis, MO USA
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
-
jimdalrymp
- Posts: 13
- Joined: Wed Jun 20, 2007 2:34 pm
- Location: St. Louis, MO USA
Thank you for the quick reply.
I have been using the Uncompressed build mode and the Debug Build check box was not checked.
I place a LABEL control onto the form where the caption property referenced a variable in the script and it displayed the variable value on the form without a problem. So it seems that the problem is how to do this using an EDIT control?
I have been using the Uncompressed build mode and the Debug Build check box was not checked.
I place a LABEL control onto the form where the caption property referenced a variable in the script and it displayed the variable value on the form without a problem. So it seems that the problem is how to do this using an EDIT control?
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
-
jimdalrymp
- Posts: 13
- Joined: Wed Jun 20, 2007 2:34 pm
- Location: St. Louis, MO USA
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Mistake. You have to set Object Behavior -> Receives Information to [Written Variable Value] and Object Behavior -> Writes Values to Variable to your variable name.
Double click the edit box to see all object behaviors.
Double click the edit box to see all object behaviors.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Jim,
I don't think edit boxes work the same way as labels. That is, pumping the variable name into the text property will not work like it will pumping the variable name into the label caption.
Instead, you might as well remove the variable name from the text property. Then double-click on the edit box and select the Object Behavior tab. Change the Receives Information and select [Written Variable Value] and in Write Values to Variable enter $DEFAULTINSTANCE$. That will give the default value you are after and you can then edit it as necessary at runtime. You should then be good-to-go.
Hope this helps.
EDIT: I just noticed that Michael beat me by a few minutes with the same answer. His pre-confirms mine.
I don't think edit boxes work the same way as labels. That is, pumping the variable name into the text property will not work like it will pumping the variable name into the label caption.
Instead, you might as well remove the variable name from the text property. Then double-click on the edit box and select the Object Behavior tab. Change the Receives Information and select [Written Variable Value] and in Write Values to Variable enter $DEFAULTINSTANCE$. That will give the default value you are after and you can then edit it as necessary at runtime. You should then be good-to-go.
Hope this helps.
EDIT: I just noticed that Michael beat me by a few minutes with the same answer. His pre-confirms mine.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
InstallAware MVP
-
jimdalrymp
- Posts: 13
- Joined: Wed Jun 20, 2007 2:34 pm
- Location: St. Louis, MO USA

