I'm not sure about how to evaluate conditions on key presses. You might be better off asking the microsoft.public.platformsdk.msi news group on that one.
As for the custom action and setproperty. I'd recommend adding a call to the custom action via the <controlconditions> element. That way, you can be sure that the custom action is run after the properties are set. When are you specifying for your custom action to run, now? Jim On Sun, 26 Sep 2004 16:28:23 -0600, Burton, Kevin <[EMAIL PROTECTED]> wrote: > I have found a partial answer to my first question. It seems that just the word 'OR' > or 'AND' does the logical operation. I say partial because it seems that the > "condition" is only evaluated when the focus leaves the control. So if the password > field has 'password' in it I would expect that as soon as I entered 'd' in the > password confirmation dialog that the 'Next' button would be enabled. Instead I have > to do something to cause focus to leave the edit field before the condition is > evaluated. Do you know of a way for the condition to be evaluated after each input > character? > > I still have a question on the "complex" condition (requiring a custom action to > evaluate the condition). > > I have found some tables in Orca that give me all of the information that I need to > bypass any of the dialogs. I just missed those tables when I initially reported a > problem. Thanks anyway. > > Now, I only have a question on why the setproproperty on the control does not seem > to be doing so. The dialog runs and the property should be set right? When I go to > read the property from a custom action the property is there it is just blank. Am I > missing something? > > Thank you again for your help. > > Kevin > > > > -----Original Message----- > From: Burton, Kevin > Sent: Thursday, September 23, 2004 11:28 AM > To: 'Jim Geurts'; [EMAIL PROTECTED] > Subject: RE: Dialog tutorial > > Thank you very much. This will do a great deal to moving me forward. > > A couple of questions (of course) > > In <controlconditions> can I (and how do I) make the condition more complex that > just seeing if the USERNAME is blank or not? One other condition for my case would > be that the password and the password confirmation match so I am thinking that I > need an OR (I am not sure of the syntax) with something like > "PASSWORD<>PASSWORDCONFIRMATION" on the disable and the logical opposite for > the enable. Basically I am not sure how to specify the logical OR or logical AND in > the condition expression. > > Now what if I want to to even more complex validation. I actually want to see if > this is a valid user name and password. To do that I am guessing that I need a > custom action so that I can try to authenticate to the Windows account. If I am > sucessful then the action would return success (true?) if not then the action would > return failure (false?). Can this be incorporated into either the > <controlconditions> or the <controlevents>? If so then what would be the syntax? > > Thank you again. > > Kevin > > -----Original Message----- > From: Jim Geurts [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 23, 2004 9:59 AM > To: Burton, Kevin; [EMAIL PROTECTED] > Subject: Dialog tutorial > > Let me apologize... I've been very busy at work lately, which is why I > might lag on replies... > > Anyway, I'll give this one a shot. If you find anything useful, > please add it to the wiki as it will probably help the next person. > > First, one of the better places to see how to add a dialog to an msi > task is the sample that adds a dialog to gather virtual directory > information. It is located here: > http://nant.sourceforge.net/wiki/index.php/sample%20build%20file > > There is another example where I remove the license dialog here: > http://nant.sourceforge.net/wiki/index.php/InstallTasks_Sample_RemoveLicenseDlg > > Ok... now to my understanding of how dialogs work in msi databases: > > <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 defines the dialog frame. It adds an entry to the Dialog table > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/dialog_table.asp) > so that the dialog can be used anywhere in the install. > > <controls> > <!-- Default header (similar on all dialogs) --> > <control dialog="UserCredentialDlg" name="BannerBitmap" type="Bitmap" > x="0" y="0" width="374" height="44" attr="1" > text="[BannerBitmap]" nextcontrol="UserLabel" /> > <control dialog="UserCredentialDlg" name="Title" type="Text" > x="15" y="6" width="200" height="15" attr="196611" > text="[DlgTitleFont]User Credential Information" /> > <control dialog="UserCredentialDlg" name="Description" type="Text" > x="25" y="23" width="280" height="15" attr="196611" > text="Please enter your login information." /> > <control dialog="UserCredentialDlg" name="BannerLine" type="Line" > x="0" y="44" width="374" height="0" attr="1" /> > > <!-- Main dialog controls --> > <control dialog="UserCredentialDlg" name="UserLabel" type="Text" > x="18" y="73" width="128" height="15" attr="3" > text="User:" nextcontrol="UserName" /> > <control dialog="UserCredentialDlg" name="UserName" type="Edit" > x="18" y="85" width="252" height="18" attr="7" > property="USERNAME" > text="[USERNAME]" > nextcontrol="PasswordLabel" /> > <control dialog="UserCredentialDlg" name="PasswordLabel" type="Text" > x="18" y="110" width="128" height="15" attr="3" > text="Password:" > nextcontrol="Password" /> > <control dialog="UserCredentialDlg" name="Password" type="Edit" > x="18" y="122" width="252" height="18" attr="2097159" > property="PASSWORD" > text="[PASSWORD]" > nextcontrol="PasswordConfirmationLabel" /> > <control dialog="UserCredentialDlg" > name="PasswordConfirmationLabel" type="Text" > x="18" y="147" width="128" height="15" attr="3" > text="Confirm Password:" > nextcontrol="PasswordConfirmation" /> > <control dialog="UserCredentialDlg" name="PasswordConfirmation" type="Edit" > x="18" y="159" width="252" height="18" attr="2097159" > property="PASSWORDCONFIRMATION" > text="[PASSWORD]" > nextcontrol="Back" /> > > <!-- Default footer (similar on all dialogs) --> > <control dialog="UserCredentialDlg" name="BottomLine" type="Line" > x="0" y="234" width="374" height="0" attr="1" /> > <control dialog="UserCredentialDlg" name="Back" type="PushButton" > x="180" y="243" width="56" height="17" attr="3" > text="[ButtonText_Back]" nextcontrol="Next" /> > <control dialog="UserCredentialDlg" name="Next" type="PushButton" > x="236" y="243" width="56" height="17" attr="3" > text="[ButtonText_Next]" nextcontrol="Cancel" /> > <control dialog="UserCredentialDlg" name="Cancel" type="PushButton" > x="304" y="243" width="56" height="17" attr="3" > text="[ButtonText_Cancel]" nextcontrol="BannerBitmap" /> > > </controls> > > This code block defines the controls that go on the dialog. The > nextcontrol attribute specifies which control (on that dialog) gets > focus next, when the user presses tab. There must be a closed circle. > I changed some of your initial code so that the cycle is closed. > > You can add a control condition element block to conditionally > show/hide controls on the dialog. This block is useful if you would > like to disable the next button until the user has entered a username. > For that, you can do something like the following: > <controlconditions> > <controlcondition dialog="UserCredentialDlg" control="Next" action="Disable" > condition="USERNAME=""" /> > <controlcondition dialog="UserCredentialDlg" control="Next" action="Enable" > condition="USERNAME<>""" /> > </controlconditions> > > To control what happens when a user clicks a button on your dialog, > you need to add events to the controls. This is done via the control > events element. Because you're adding a dialog, you'll need to remove > existing control events and add new ones pointing to the correct > dialog. To add your dialog between the user registration dialog and > the setup type dialog, you would add the following block: > > <controlevents> > <!-- Remove the old control events --> > <controlevent dialog="UserRegistrationDlg" control="Next" name="NewDialog" > argument="SetupTypeDlg" condition="ProductID" remove="true" /> > > <controlevent dialog="SetupTypeDlg" control="Back" name="NewDialog" > argument="LicenseAgreementDlg" > condition="ShowUserRegistrationDlg <> 1" remove="true" /> > <controlevent dialog="SetupTypeDlg" control="Back" name="NewDialog" > argument="UserRegistrationDlg" > condition="ShowUserRegistrationDlg = 1" remove="true" /> > > <!-- Replace the old events (just deleted) with new ones mapping > to the new dialog --> > <controlevent dialog="UserRegistrationDlg" control="Next" name="NewDialog" > argument="UserCredentialDlg" condition="ProductID" /> > <controlevent dialog="SetupTypeDlg" control="Back" name="NewDialog" > argument="UserCredentialDlg" /> > > <!-- Add new control events for the new dialog --> > <controlevent dialog="UserCredentialDlg" control="Cancel" name="SpawnDialog" > argument="CancelDlg" order="0" /> > <controlevent dialog="UserCredentialDlg" control="Back" name="NewDialog" > argument="LicenseAgreementDlg" > condition="ShowUserRegistrationDlg<>1" > order="0" /> > <controlevent dialog="UserCredentialDlg" control="Back" name="NewDialog" > argument="UserRegistrationDlg" condition="ShowUserRegistrationDlg=1" > order="0" /> > > <controlevent dialog="UserCredentialDlg" control="Next" name="NewDialog" > argument="SetupTypeDlg" condition="1" order="0" /> > </controlevents> > > Let me know if things are still a little foggy... I've included the > test file that I used to add this dialog. > > Jim > ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ NAntContrib-Developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer