Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve User Name

Status
Not open for further replies.

CooterBrown

IS-IT--Management
Aug 17, 2001
125
US
How would I retrieve the USERNAME or Network LogOn parameter?
 
You can also use the Windows Script Host Object Model in most cases:
Code:
    Dim strUser As String, strDomain As String, strComputer As String
    
    With CreateObject("WScript.Network")
        strUser = .UserName
        strDomain = .UserDomain
        strComputer = .ComputerName
    End With
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top