Getting the currently logged-in windows user
You could also do this:
Set WshNetwork = CreateObject("WScript.Network")Print WshNetwork.UserName
It also has a UserDomain property and a bunch of other things:
http://msdn.microsoft.com/en-us/library/907chf30(VS.85).aspx