473,394 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Obtaining complete User List

Hi all,

My question is: How do you obtain a complete list of all the users
that are registered on the local machine? I've been trying for hours
now and can't find anything that will help on the groups.

Anyone have any idea how to do this in VB.NET?

thanks

Dave

Feb 24 '06 #1
1 2692
Hi after a bit of searching I found this sample on the newsgroup which does
what you want:

Add reference to System.DirtectoryServices

Imports System.DirectoryServices

Dim de As DirectoryEntry
Dim Child As DirectoryEntry

de = New DirectoryEntry("WinNT://" & Environment.MachineName & ",computer")
'Filter for only "User" entries.
de.Children.SchemaFilter.Add("user")

Console.WriteLine("USERS:")
For Each Child In de.Children
Console.WriteLine(" - " & Child.Name)
Next Child
Hope this helps

Greetz, Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

"Dave" <da*******@gmail.com> schreef in bericht
news:11**********************@v46g2000cwv.googlegr oups.com...
Hi all,

My question is: How do you obtain a complete list of all the users
that are registered on the local machine? I've been trying for hours
now and can't find anything that will help on the groups.

Anyone have any idea how to do this in VB.NET?

thanks

Dave

Feb 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John | last post by:
Hello, I need to know which programs are opn on another machine in my network, these programs are opened from a shared drive on the server. How can I do this ? I've already dowloaded a sample...
11
by: middletree | last post by:
I need to capture the previous page's URL. I thought I could find a way to do it with client-side code, but I have been unable to find a way to do that, so perhaps there's an ASP solution. ...
0
by: VP | last post by:
Hi there, well i am stuck on a problem with regards to obtaining security permissions on folders. At the moment I have created a simple treeview example which shows all sub-directories in a tree...
2
by: Mark Hollander | last post by:
Hi All, Is there an example of creating a Window List on the fly so that the user can select a form that may be hidden behind other forms. Or if you could help me with a code snippet to do...
2
by: cmrchs | last post by:
Hi, I try to obtain the current culture of a server by executing : Dim str as String str = Thread.CurrentThread.CurrentCulture.ToString() Executing this in a console-applicastion results in...
8
by: John | last post by:
Hi, I am developing an application using VB.Net and hope that the textbox can process features which are similar to auto-complete features in Window. For example, when user types "ap" in a...
6
by: Smithers | last post by:
I am looking to implement a search feature into a Windows Forms MDI application. Specifically I plan to embed 3 textboxes into a toolbar; one for LastName, another for FirstName, and one for...
11
by: John Nagle | last post by:
The Python SSL object offers two methods from obtaining the info from an SSL certificate, "server()" and "issuer()". The actual values in the certificate are a series of name/value pairs in ASN.1...
8
by: Daz | last post by:
Hi everyone. I just wanted to know if there was any way to use script to display a list of methods linked to a particular object? The object I have in mind is getBrowser(), and I can't seem to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.