I want to control the login to our network. I need the username, date and time as well as the workstation name.

If I try

The output at the screen is absolutely correct, also the computername.

If I try
#command /c echo %LOGIN_NAME, %DAY.%MONTH.%YEAR, %HOUR:%MINUTE:%SECOND, %COMPUTERNAME >> z:\login\login.txt

It writes the file but the variable %COMPUTERNAME is not interpreted. So it looks like
xxxxxx, 02.12.2009, 4:00:12, %COMPUTERNAME

Can you tell me what I have to change that I get also the computername correctly?

Thank you in advance