• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

Getting the Workstation/User Info

hello guys...

i'm tasked to get the workstation where the user has logged in and the user name as well but simply dunno how to do it...can u teach me how to do it? i'm gonna use the info in tracking the users of the system..and can u also teach me how to get the list of pc's in the network?

thank you very much...

2 Solutions
It's called kixtart


This will give you the username and machinename.

And at the command prompt try

net view
ruishenAuthor Commented:
i already checked out the site...
sorry forgot to include the most important thing: i want to get the info thru visual basic 6.0...
thanks for ur comment...
download psloggedon.exe (freeware from www.sysinternals.com)

shell "cmd.exe /c psloggedon.exe  \\ <computername> >abc.txt"
and read abc.txt file to get the logged on information (you shall need admin previlages)

shell "cmd.exe /c net view >abc.txt"
and read abc.txt file to get the list of all users in the network neigh.
You're going to have some fun!! I hope you are familiar with Windows API programming in VB, as most of the functionality comes from Netapi32.
To get Workstation info you'll need NetWkstaGetInfo, to enumerate servers in a lan it's NetServerEnum, and to get info about each it's NetServerGetInfo.
Look at: (it's all one string, I'm not sure how to add an URL here)
This lists all the functions in this API.

.. Alan
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now