Archive: Validating password


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


You can use IsCharAlpha with System.dll on every char.


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!


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.

There are lots of system.dll examples in the archive, a mini tutorial in the manual and even more examples in the forum.