$ENV{USERNAME} [download]
may be all you need.
In reply to Re: How to get the User login name in Win2000 by BrowserUk in thread How to get the User login name in Win2000 by arunmep