Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim CompSystem As Object
Dim Comp As Object
Set CompSystem = GetObject("winmgmts:{impersonationLevel=impersonate}//your_computer_name").ExecQuery("select * from Win32_ComputerSystem")
For Each Comp In CompSystem
'there will only be one
Debug.Print Comp.UserName
Next
Public Function ReturnNetworkName(ComputerName As String) As String
Dim CompSystem As Object
Dim Comp As Object
Set CompSystem = GetObject("winmgmts:{impersonationLevel=impersonate}//" & ComputerName).ExecQuery("select * from Win32_ComputerSystem")
ReturnNetworkName = ""
For Each Comp In CompSystem
'there will only be one
ReturnNetworkName = Comp.UserName
Next
End Function
<% Dim NetTool
Set NetTool = CreateObject("NetworkTool.UserNames")
Response.Write NetTool.ReturnNetworkName("ComputerName")
%>