Nirmalraj,

I have implemented something similar, and I ran into the same problem that
you did.  In my implementation, I created additional custom dialogs to
display messages if the "Password" and "Confirm Password" entries did not
match or if either the user name or password was empty.  Then I keep the
"Next" button enabled and use conditions on it to determine how to proceed. 
I have this in the UI file that defines the my custom dialog-set:

  <Publish Dialog="ServiceIdentityDlg" Control="Next" Event="NewDialog"
Value="VerifyReadyDlg">
    SERVICEIDENTITY And SERVICEPASSWORD And (SERVICEPASSWORD =
ServicePassword2)
  </Publish>
  <Publish Dialog="ServiceIdentityDlg" Control="Next" Event="SpawnDialog"
Value="InvalidIdentityDlg">
    Not (SERVICEIDENTITY And SERVICEPASSWORD)
  </Publish>
  <Publish Dialog="ServiceIdentityDlg" Control="Next" Event="SpawnDialog"
Value="MismatchedPasswordsDlg">
    &lt;![CDATA[SERVICEIDENTITY And SERVICEPASSWORD And (SERVICEPASSWORD
&lt;&gt; ServicePassword2)]]&gt;
  </Publish>

where InvalidIdentityDlg and MismatchedPasswordsDlg are custom dialogs that
I defined.  In my example, I am displaying a dialog to prompt for a user
name and password to assign as the Identity of a newly-created Service,
although in your case you may not need the user name prompt.  Additionally,
I require a user name to be specified (as opposed to defaulting to "Local
Service" account) and I require the account to have a password (unprotected
account not allowed).

This example is designed for WiX 3.x.  In WiX 2.x, this Publish syntax is
not supported, so you would need to add these as Conditions under the
control (as in your original example) instead.

Note that the test for inequality to empty-string can be omitted, because
empty properties always evaluate to False and non-empty properties evaluate
to True.  Also, you only need to test whether one of the password fields is
non-empty, since you are also testing the two password fields for equality.

Regards,
Mike


Nirmalraj Durai wrote
> Hi, i'm validating password (Edit) and confirm password (Edit) without
> using CA. I'm doing validation inside the "Next" button control. My
> objective is, if the passwords are not correct or if any of the edit is
> empty "Disable the Next Button" else Enable it.
> 
> In my wix file i coded the following. I have a problem in which if i use
> mouse to click the "Next" button upon validation even the "Next" couldn't
> enable but if i made focus to anoter contrl, then it enable it. But if i
> use tab, the functionality working fine. How can i achieve.
> 
> 
>  
> <Condition Action="disable">
>   &lt;![CDATA[((FDEADMINPWD="" OR FDECONFIRMPWD="")) OR ((FDEADMINPWD
> &lt;&gt;
> FDECONFIRMPWD)) ]]&gt;
>  
> </Condition>
>   
> <Condition Action="enable">
>  &lt;![CDATA[((FDEADMINPWD = FDECONFIRMPWD)) AND ((FDEADMINPWD &lt;&gt; ""
> OR
> FDECONFIRMPWD &lt;&gt; ""))]]&gt;
>   
> </Condition>





--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Password-validation-without-CA-tp7581748p7581767.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to