Just out of curiousity, I ran the script to check this out.. If there is an error, it never gets reset..

code:
 BREAK ON
$rc=SetOption('WrapAtEOL','ON')

; uncomment the next line to step through the code
; Debug ON
; Example of LDAP call. GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com")
; You need to know your LDAP connection. You can maybe find it by checking the propery details on the OU for your users.
$target = GetObject("LDAP://OU=Test,OU=AdminBldg,DC=sussexcounty,DC=net")
? 'Error = '+@error+' - '+@serror
$loginscript="ntlogon.bat"
FOR EACH $user IN $target
? 'checking user: '+$user.name
$script = $user.loginscript
? 'assigned login script: '+$script
IF @error <> O
$loginscripterror = @error
? "Logon script error: @error - @serror"
IF $script <> $loginscript OR $loginscripterror
? "Current Script for " +$user.name " is: " +$script+ " Should be: " +$loginscript
;;$user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat.
;;? 'Error = '+@error+' - '+@serror
;;$user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat.
;;? 'Error = '+@error+' - '+@serror
;;? "Changed current Script for " +$user.name " to: " +$user.loginscript
ENDIF
$loginscripterror = 0
SLEEP 2
ENDIF
NEXT

HTH,

Kent

[ 24. March 2003, 23:36: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's