You might want to learn how to modify your script so that it prints more info. Try this:
code:
Break 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=Information Systems,OU=AdminBldg,DC=sussexcounty,DC=net")
? 'Error = '+@ERROR+' - '+@SERROR
$loginscript="logon.bat"
For Each $user in $target
? 'checking user: '+$user.name
? 'assigned login script: '+$user.loginscript
If $user.loginscript <> $loginscript
? "Current Script for " +$user.name " is: " +$user.loginscript+ " 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
Next
? 'If no user was displayed, then no user was retrieved from the OU'



[ 04. March 2003, 20:35: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.