Does anyone have time to give me a quick tutorial on dialogs in the <msi> task?

I have the following:

            <!-- Adds the dialog used to specify the virtual directory name -->
            <dialogs>
                <dialog name="UserCredentialDlg" hcenter="50" vcenter="50"
                    width="360" height="150" attr="39"
                    title="[ProductName] [Manufacturer] [ProductVersion]" 
firstcontrol="UserName"
                    defaultcontrol="UserName" cancelcontrol="Cancel" />
            </dialogs>

This declares a dialog. I think I understand this. Then I have:

            <!-- Adds the controls associated with the dialog -->
            <controls>
                <control dialog="UserCredentialDlg" name="UserLabel" type="Text"
                    x="8" y="8" width="128" height="23" attr="3"
                    text="User:"
                    nextcontrol="UserName" />
                <control dialog="UserCredentialDlg" name="PasswordLabel" type="Text"
                    x="8" y="40" width="128" height="23" attr="3"
                    text="User:"
                    nextcontrol="Password" />
                <control dialog="UserCredentialDlg" name="PasswordConfirmationLabel" 
type="Text"
                    x="8" y="720" width="128" height="23" attr="3"
                    text="User:"
                    nextcontrol="PasswordConfirmation" />
                <control dialog="UserCredentialDlg" name="UserName" type="Edit"
                    x="136" y="8" width="216" height="20" attr="7"
                    property="SERVICEUSER"
                    text="[SERVICEUSER]"
                    nextcontrol="Password" />
                <!--
                Creates an edit control for entering passwords. Add 2097152 to the 
value in
                the Attributes column of the Control table to create an edit control 
that
                displays each character as an asterisk (*) as they are typed into the 
control.
                This attribute is not available with Windows Installer version 1.0.
                -->
                <control dialog="UserCredentialDlg" name="Password" type="Edit"
                    x="136" y="40" width="216" height="20" attr="2097159"
                    property="SERVICEPASSWORD"
                    text="[SERVICEPASSWORD]"
                    nextcontrol="PasswordConfirmation" />
                <control dialog="UserCredentialDlg" name="PasswordConfirmation" 
type="Edit"
                    x="136" y="72" width="48" height="18" attr="2097159"
                    property="SERVICEPASSWORD"
                    text="[SERVICEPASSWORD]"
                    nextcontrol="OK" />


                <control dialog="UserCredentialDlg" name="OK" type="PushButton"
                    x="16" y="112" width="56" height="17" attr="3"
                    text="OK" nextcontrol="Cancel" />
                <control dialog="UserCredentialDlg" name="Cancel" type="PushButton"
                    x="272" y="112" width="56" height="17" attr="3"
                    text="Cancel" nextcontrol="OK" />

            </controls>

This adds "definition" to the dialog. It basically adds a text box for the user to 
enter a user name and two password boxes for the user to enter a password and a 
password confirmation. Finally at the end it adds two buttons for OK and CANCEL. The 
result that I want is that the user clicks on OK and the properties are set as defined 
above. If the user clicks CANCEL then the installation is aborted.

Now this is where I start to loose understanding. There are two sections 
<controlconditions> and <controlevents>. I am not sure how to correctly fill in the 
values for these two sections. Is what I want is for some validation to occur (make 
sure that the user name and password exist, and make sure that the password and the 
password confirmation match) if the validation is OK then I want to call a custom 
action that will look up some services and use the credentials entered to run the 
service under a particular account. Like I said if the user clicks CANCEL then I want 
to abort the installation.

The examples that are on the wiki are too complex and many of the identifiers seem 
either not to exist or they are defined outside of the example making it very hard for 
me to read what is going on. My first guess at setting <controlconditions> and 
<controlevents> is below but this is based on limited understanding and I am sure they 
are not what I want because I am not sure that I understand what is specified.

Any tips?

Thank you.

Kevin

            <controlconditions>
                <controlcondition dialog="UserCredentialDlg" control="Cancel" 
action="Disable"
                    condition="ShowUserCredentialDlg=&quot;&quot;" />
                <controlcondition dialog="UserCredentialDlg" control="Cancel" 
action="Enable"
                    condition="ShowUserCredentialDlg&lt;&gt;&quot;&quot;" />
            </controlconditions>

            <controlevents>
                <!-- Add new control events for the credential dialog -->
                <controlevent dialog="UserCredentialDlg" control="OK" name="NewDialog" 
                    argument="SetupTypeDlg" condition="1" order="0" />
                <controlevent dialog="UserCredentialDlg" control="Cancel" 
name="EndDialog" 
                    argument="Exit" condition="1" />
            </controlevents>


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
NAntContrib-Developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer

Reply via email to