Yes this should work at logon. To be sure use a local drive to store the text file.

I did not use any bat files for years and I never did any extended scripting in batch so I do not have the code ready for you but there must be some possibilities with %computername%. I'd go for a kix solution but it all depends on what you feel comfortable with.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.