Accessing %LOGIN_NAME variable from within a batch file

I have written a batch file that checks for the existance of a file on a users hard drive.  If it doesn't find the file, I want it to create a file on a server that is named after the user's Netware login name.  I know that you can use %LOGIN_NAME in scripts, but how can I access that same variable information from within a batch file?
tdiamondAsked:
Who is Participating?
 
brosenb0Connect With a Mentor Commented:
In your login script set an environment variable to the user's login name, eg.
Dos Set NetUser = %LOGIN_NAME

In your batch file you can now use %NetUser for whatever you want.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.