Quote:
ok it comes up with the error message.

error : missing endfunction for [writelog2]!
script \\*.local\netlogon\agtbslogon.kix


Something must have went wrong on the copy/paste. I get the same error as you when I use the function as you posted it above. But if I copy it from the link above and paste that version, it works fine. Try re-copying and pasting again...from here...

WriteLog2() - Writes to a specified log file with optional TimeStamp
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=83049#Post83049