Wouldn't this be cleaner if you created each user share with oneuser.txt in it and set the security permissions for that file for one user only. Then attach & open file on logon if you can't attach it then it is already being used - then force a log off.

For you method to work it seems to me you must delete userid.txt at the end of each session. Can you guarantee this? Doesn't this clutter up your netlogon share?

_________________________
Jack