Solved

Getting the Workstation/User Info

Posted on 2003-11-14
7
298 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 49

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 …
Simple Linear Regression

691 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