?
Solved

Determine NT User ID from Machine Name

Posted on 2001-08-14
10
Medium Priority
?
246 Views
Last Modified: 2010-05-02
Is there any way I can determine which network UserID is currently logged on to a particular machine based solely on the machine name?
0
Comment
Question by:brian_andrews
[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
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 5

Expert Comment

by:dredge
ID: 6385441
nope.
0
 
LVL 5

Expert Comment

by:dredge
ID: 6385444
the machine name has nothing to do with the current logged on user.
0
 
LVL 3

Expert Comment

by:Diveblue
ID: 6385453
Will you be running the process on the machine in or on some other machine??
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:brian_andrews
ID: 6385455
What about the reverse...retrieving a machine name based on a network userid?
0
 

Author Comment

by:brian_andrews
ID: 6385457
A remote machine...
0
 
LVL 3

Expert Comment

by:Diveblue
ID: 6385470
Check out
if on another machine try looking at this....
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/hh/network/ntlmapi2_6msv.asp

use  NetWkstaGetInfo with WKSTA_INFO_102

You'll need to have privs for this...

Otherwise use GetUserName api.
0
 
LVL 3

Expert Comment

by:Diveblue
ID: 6385510
<<What about the reverse...retrieving a machine name based on a network userid? >> That's another question..
0
 
LVL 4

Accepted Solution

by:
PBuck earned 400 total points
ID: 6385515
This might return a listing of what you are looking for:

http://www.mvps.org/vbnet/index.html?code/network/netwkstauserenum.htm

This is the description: "NetWkstaUserEnum lists information about all users currently logged on to the workstation, including service and batch logons, as well as interactive user logons. "

Hope this helps!
0
 

Author Comment

by:brian_andrews
ID: 6385592
Thanks, this site provides a good example.
0
 
LVL 4

Expert Comment

by:PBuck
ID: 6385674
Super!  VBNet is the site I always try first when I am stuck on something  :-)  Then I give www.planet-source-code.com a try ...

Good Luck!
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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month14 days, 23 hours left to enroll

770 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