Here's a snippet of code from my login script. All it does is check the password age.
;********************************************
;Name of Program: Pwage.kix
;Original program written: 11/12/00
;Author: Dan Drass
;Company Name: BRTRC
;Purpose: Check Password age
;
;Comment: You can edit and/or distribute this program freely
;
;********************************************
;------------------Max Password age is 90 days-------------------
$x3=10
$Pwd=@PWAGE
CLS
$MaxPw=@MAXPWAGE
cls
$x2=($MaxPw - 10)
CLS
$x4=($MaxPw - $Pwd)
Select
Case ($Pwd < $x2)
sleep 2
$null=writeprofilestring("c:\@wksta.txt","@wksta","@wksta"+chr(44)+"PWage" , "$Pwd")
CLS
Sleep 1
Case ($Pwd = $x2)
Goto Mess1
Case 2
Goto Mess1
sleep 2
EndSelect
:Mess1
CLS
Select
Case ($Pwd < $MaxPw)
$null=writeprofilestring("c:\@wksta.txt","@wksta","@wksta"+chr(44)+"PWage", "$Pwd")
?"Your Password expires in $x4 days"
sleep 2
cls
?" Processing info......wait...."
sleep 2
CLS
Case $Pwd = $MaxPw
CLS
?"Password Expires Today"
sleep 1
;---------Replace Admin with your Admin username----------------
SendMessage("Admin" , @USERID + " Password on: @wksta is due to expire in: $x4 days")
cls
sleep 2
CLS
Case 1
;---------Replace Admin with your Admin username----------------
SendMessage("Admin" , @USERID + " PassWrd Routine Error on: @wksta at @Time")
sleep 3
ENDSELECT
I'm sure the brainiacs can do better. But this program has worked so well that I refuse to change it.
Cheers 