Kent,
I'm a bit slow but it's starting to sink in a bit. Not at a DC so can't test your batch.

I have two methods of figuring out where someone is logged in. The first is to look in the WINS db. Fine if the user is only logged on to one PC. The other is to NET SEND a message to the user to call me. Yeah, I know, low tech.

Perhaps you could streamline your log format so that you don't need to reverse search it. If you set it up in an ini format with the username as the key and WriteProfileString("file name", "section", "@UserID", "@WkSta") the log details, it would be a one-liner retrieve.

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.