I'd start by adding some debugging info to see what's happening:
 Code:
$Line=@wksta+"; TSSESSION= "+ @TSSESSION +"; " + @WUSERID + "; " + @lserver + "; " + @address + "; "+@date+" "+@time+ @CRLF
'DBG-Line: ' $Line @CRLF
$filename=("\\server\share\"+@wksta + ".txt")
open (1, "$filename",5)
'DBG-Open: ' @SERROR @CRLF
writeline(1,"$Line")
close (1)
This should verify that the script is running and indicate if anything is out of whack with the data or file.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D