code is not working, so i started capturing variables the variables into a file to see if they were working. Here's the capture.

Open(9,"\\server1\LOR\NYNY\" + @userid + ".txt",5)
$LineToWrite=@date +", "+ @time + ", " + @hostname + ", " + @Fullname + ", " + @Userid + ", " + @homeShr + ", " + @LDRIVE
WriteLine(9,$LineToWrite + chr(13) + chr(10))
Close(9)