Solved

Getting the Workstation/User Info

Posted on 2003-11-14
7
241 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 47

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This is about my first experience with programming Arduino.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now