I was wondering if someone could help me out here. I'm trying to create a script that will notify a user when their password is getting ready to expire however when I run the script I've created I get notified for everytime I have message box. Any suggestions will be greatly
appreciated.


$maxpwage = 90
$passwordage = @PWAGE
$passwordtitle = "Password Expiration Notice"
$passwordnotice1 = 80
$passwordnotice2 = 85
$passwordnotice3 = 87
$passwordnotice4 = 89

:10DAYS
If $passwordnotice1 = Val($passwordage) Goto DAYS5
Else
MessageBox("$passwordtitle","Your password will expire in 10 days.",64)
EndIf

:DAYS5
If $passwordnotice2 = Val($passwordage) Goto DAYS3
Else
MessageBox("$passwordtitle","Your password will expire in 5 days.",64)
EndIf

:DAYS3
If $passwordnotice3 = Val($passwordage) Goto DAYS1
Else
MessageBox("$passwordtitle","Your password will expire in 3 days.",64)
EndIf

:DAYS1
If $passwordnotice4 = Val($passwordage) Goto END
Else
MessageBox("$passwordtitle","Your password will expire in 1515 day.",64)
EndIf

:END