Solved

Getting the Workstation/User Info

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mapAB Challlenge 35 145
Controlled Assessment GCSE - desperate help needed 4 87
Recommendation vb6 to vb.net or others 14 150
Change the background and font colors in Notepad++ 5 89
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

803 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