Lizzy
17th September 2003 15:46 UTC
Validating password
Hi
I've written an installer using MUI that asks for a password twice, checks they are the same - if so does the install, if not asks you to re-enter the passwords.
I'd also like to check that the passwords contain at least 1 non-alphabetic character - does anyone know how/if I can do this?
Thanks!
Lizzy
kichik
17th September 2003 16:12 UTC
You can use IsCharAlpha with System.dll on every char.
Lizzy
18th September 2003 10:24 UTC
I haven't used system.dll before and can't seem to find any info on it - can you point me in the right direction.
Thanks!
n0On3
18th September 2003 14:43 UTC
I would compare every character to alphabet, and mark when it's none of them.
$4 is one character from that password string.
StrCmp $4 a "Alphabet"
>StrCmp $4 b "Alphabet"
>StrCmp $4 c "Alphabet"
>StrCmp $4 d "Alphabet"
>.
.
.
>StrCmp $4 x "Alphabet"
>StrCmp $4 y "Alphabet"
>StrCmp $4 z "Alphabet"
>StrCpy $5 NotInAlphabet ; mark that this character is not in aphabet
Alphabet:
>GoTo NextCharacter
>
But I suppose that kichik method is better.
kichik
19th September 2003 12:51 UTC
There are lots of system.dll examples in the archive, a mini tutorial in the manual and even more examples in the forum.