Pages

Showing posts with label get logged in username using vbscript. Show all posts
Showing posts with label get logged in username using vbscript. Show all posts

Friday, 15 June 2012

Get ComputerName and Username - VBScript


Set oNetwork = CreateObject("WScript.Network")
sUserName = oNetwork.UserName
sComputerName = oNetwork.ComputerName
MsgBox("UserName = " & sUserName & vbCRLF & "ComputerName = " & sComputername)