i've written an administrative kixtart script that does some common task a field technician may need. Everything works EXCEPT resetting the account lockout parameter (which gets set after a user logs in with the wrong password too many times).

Can anyone tell me why cusrmgr
run "cusrmgr -u "+chr(34)+$username+chr(34)+" -s AccountLockout -m \\aisd-fr" does not work (see code below for exact syntax). No error message are given and all the other command work great. Is there another way to accomplish this without cusrmgr or net use? I don't want to use net use because non-administators are using this. Also, I know in this case it is not a rights issue because I am running the script as a domain admin.

Thanks

:begin
break on
$username = ""
$password = ""
$choice = ""
$command = ""
$message = ""
$OS = ""
$campus = ""
$directory = ""
$qusername = ""
$q = chr(34)

cls
color b/w+
Box (0,0,2,50, double)
AT (1,2) "Account Menu"
color w+/b
Box (3,0,30,50,double)
AT (5,2) "1. Change Password & Remove Password Lockout"
AT (7,2) "2. Remove Password Lockout"
AT (9,2) "3. Enable Password Lockout"
AT (11,2) "4. Enable Account (Network Admins only)"
AT (13,2) "5. Disable Account (Network Admins only)"
AT (15,2) "6. Get PC Info"
AT (17,2) "7. Get PC Bios Info"
AT (19,2) "Q. Quit"
AT (25,2) "Enter Selection (1-7, Q) ?" get $choice

Select
case $choice = "1"
goto "chngpw"
case $choice = "2"
goto "rmlock"
case $choice = "3"
goto "enlock"
case $choice = "4"
goto "enacct"
case $choice = "5"
goto "dsacct"
case $choice = "6"
goto "compinfo"
case $choice = "7"
goto "biosinfo"
case $choice = ""
goto "end"
case $choice =" "
goto "end"
case $choice = "q"
goto "end"
endselect

:chngpw
cls
color b/w+
Box (0,0,2,50, double)
AT (1,2) "Change Password & Remove Password Lockout"
color w+/b
Box (3,0,30,50,double)

AT (5,2) "Enter UserID: " gets $username
AT (7,2) "Enter Password: " gets $password
if $username = "" or $username = " "
color r+/b
At (29,2) "No UserID provided. Try again..."
sleep 3
goto "begin"
endif
if $password = "" or $password = " "
color r+/b
At (29,2) "No password provided. Try Again..."
sleep 3
goto "begin"
endif
$command = "cusrmgr -u "+chr(34)+$username+chr(34)+" -P "+$password+" -m \\aisd-fr"
run "$command"
sleep 2
$command = "cusrmgr -u "+chr(34)+$username+chr(34)+" +s MustChangePassword -m \\aisd-fr"
run "$command"
sleep 2
$command = "cusrmgr -u "+chr(34)+$username+chr(34)+" -s AccountLockout -m \\aisd-fr"
run "$command"
sleep 2
AT (25,2) "Press any key to return to main menu..." get $choice
goto "begin"

:rmlock
cls
color b/w+
Box (0,0,2,50, double)
AT (1,2) "Remove Password Lockout"
color w+/b
Box (3,0,30,50,double)
AT (5,2) "Enter UserID: " gets $username
if $username = "" or $username = " "
color r+/b
At (29,2) "No UserID provided. Try again..."
sleep 3
goto "Begin"
endif
$command = "cusrmgr -u "+chr(34)+$username+chr(34)+" -s AccountLockout -m \\aisd-fr"
run "$command"
AT (25,2) "Press any key to return to main menu..." get $choice
goto "begin"

:enlock
cls
color b/w+
Box (0,0,2,50, double)
AT (1,2) "Enable Password Lockout"
color w+/b
Box (3,0,30,50,double)
AT (5,2) "Enter UserID: " gets $username
if $username = "" or $username = " "
color r+/b
At (29,2) "No UserID provided. Try again..."
sleep 3
goto "Begin"
endif
$command = "cusrmgr -u "+chr(34)+$username+chr(34)+" +s AccountLockout -m \\aisd-fr"
run "$command"
AT (25,2) "Press any key to return to main menu..." get $choice
goto "begin"

:enacct
cls
color b/w+
Box (0,0,2,50, double)
AT (1,2) "Enable Account"
color w+/b
Box (3,0,30,50,double)
AT (5,2) "Enter UserID: " gets $username
if $username = "" or $username = " "
color r+/b
At (29,2) "No UserID provided. Try again..."
sleep 3
goto "Begin"
endif
$command = "cusrmgr -u "+chr(34)+$username+chr(34)+" -s AccountDisabled -m \\aisd-fr"
run "$command"
AT (25,2) "Press any key to return to main menu..." get $choice
goto "begin"

:dsacct
cls
color b/w+
Box (0,0,2,50, double)
AT (1,2) "Disable Account"
color w+/b
Box (3,0,30,50,double)
AT (5,2) "Enter UserID: " gets $username
if $username = "" or $username = " "
color r+/b
At (29,2) "No UserID provided. Try again..."
sleep 3
goto "Begin"
endif
$command = "cusrmgr -u "+chr(34)+$username+chr(34)+" +s AccountDisabled -m \\aisd-fr"
run "$command"
AT (25,2) "Press any key to return to main menu..." get $choice
goto "begin"

:sndmsg
cls
color b/w+
Box (0,0,2,50, double)
AT (1,2) "Send Message"
color w+/b
Box (3,0,30,50,double)
AT (5,2) "Enter UserID or Computer Name: " gets $username
if $username = "" or $username = " "
color r+/b
At (29,2) "No UserID provided. Try again..."
sleep 3
goto "Begin"
endif
AT (7,2) "Enter Message: " gets $message
$command = "sendmessage("+$username +","+$message+")"
run "$command"
goto "begin"

:compinfo
if @INWIN = 1
$OS = "NT or W2K"
endif
if @inwin = 2
$OS = "9x"
endif
cls
color b/w+
Box (0,0,2,50, double)
AT (1,2) "Computer Informaton"
color w+/b
Box (3,0,30,50,double)
AT (5,2) "Date: " @DATE " Time: " @TIME
AT (6,2) "NIC Address: " @ADDRESS
AT (7,2) "IP Address: " @IPADDRESS0
AT (8,2) "Workstation Name: "@WKSTA
AT (9,2) "Host Name: " @HOSTNAME
AT (10,2) "PC Domain: " @DOMAIN
AT (11,2) "OS: " $OS
AT (12,2) "NT Version: " @DOS
AT (13,2) "Network Software Directory: " @LANROOT
AT (14,2) "Network Software Version: " @LM
AT (25,2) "Press any key to return to main menu..." get $choice
goto "begin"

:biosinfo
cls
color b/w+
Box (0,0,2,50, double)
AT (1,2) "PC Bios Informaton"
AT (3,2) "PC BIOS Version: " run "cscript checkbios.vbs"
sleep 5
AT (50,2) "Press any key to return to main menu..." get $choice
goto "begin"

:end