List users available to Windows

ImDaFrEaK

Well-known member
Joined
Jan 7, 2006
Messages
416
Location
California
Programming Experience
5-10
I am looking for a way to find and list all the users on the OS or a better idea to solve this equation. I have an application that needs to setup the directory for each user from within it's startup path. So basically if I had three users; whether they were currently logged on or not; I want to have their own folder built with the initial run of the application.

Example:

VB.NET:
Directory.CreateDirectory(Application.Startup & "\" & Environment.UserName)

I know that works for each individual user but I would rather all the users be listed at once. Another reason is I don't want the program to run for all users and I want the Admin to decide which users the program does run on.

If i can't list them all then I can't give the Admin an easy way of doing this. Then again, there might not be a way at all. I may have to have the admin type the name of the user they want the program to be available to.

Any ideas? Either way, if there is a way to list all users I am very curious.
 
Back
Top