galdiano

cusrmgr.exe sets the value of KiXtart's @ERROR macro, try changing your line from this...

$command = "cusrmgr -u "+chr(34)+$username+chr(34)+" -s AccountLockout -m \\aisd-fr"

to this ...

$command = '%comspec% /c cusrmgr -u "$username" -s AccountLockout -m \\aisd-fr'

[this gets rid of those chr(34)'s as well]

then change your RUN "$COMMAND" to SHELL "$COMMAND"

[this is probably better anyway, SHELL pauses the script until the command terminates - a good thing?]

and put this right after it ...

?"ERROR @ERROR : @SERROR"

and re-run. Does cusrmgr.exe report anything unusual ?

-Shawn

[ 25 July 2001: Message edited by: Shawn ]