To get the name of a a computer user, use the UserName Property of WshNetwork Object.
The following example demonstrates how to get the name of a current computer user:
WshNetwork = new ActiveXObject( "WScript.Network" );
alert( "User Name = " + WshNetwork.UserName );
Set WshNetwork = CreateObject( "WScript.Network" )
alert "User Name = " & WshNetwork.UserName
Microsoft MSDN Library: UserName Property
Send feedback on this topic to Emurasoft