$ENV{USERNAME} will likely hold the name of the user currently logged on on Win32.
In reply to Re: Finding username in Win32 by Corion in thread Finding username in Win32 by esr