Solved

Getting the Workstation/User Info

Posted on 2003-11-14
7
286 Views
Last Modified: 2010-04-17
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...

0
Comment
Question by:ruishen
7 Comments
 
LVL 48

Expert Comment

by:dbrunton
ID: 9752169
It's called kixtart

http://www.kixtart.org/

This will give you the username and machinename.

And at the command prompt try

net view
0
 

Author Comment

by:ruishen
ID: 9760521
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...
0
 
LVL 9

Accepted Solution

by:
bhagyesht earned 50 total points
ID: 9761544
download psloggedon.exe (freeware from www.sysinternals.com)
use

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.
0
 
LVL 10

Assisted Solution

by:ADSaunders
ADSaunders earned 50 total points
ID: 9797869
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)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/network_management_functions.asp
This lists all the functions in this API.

.. Alan
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this post we will learn different types of Android Layout and some basics of an Android App.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question