System User Information  
Author Message

PostPosted: Visual C# Language, System User Information Top

I am looking for the best way to pull user profile information in a C# Windows app. I need to pull only users that have profiles on the system. I wish to pull this data with the desire to relocate their My Documents / Favorites / Desktop / and Temp space. Here are my issues:

Domain Users:

Domain Users only appear in the registry when they are logged in. Can I programatically relocate their entire profile (or individual components) via C# or is this strictly controlled by the domain server.


WMI only shows local user and it shows all local users (using select * from Win32_UserAccount). Is there a way to only get those users with profiles on the system Also, is there a way to pull domain users with profiles (if Domain users are exclusively controlled by the domain server, then this is not needed).

Relocating Profiles:

I can relocate individual profile items from the registry but, is there a way to relocate the entire user profile programatically using C#.

Hopefully this makes sense. Any help is greatly appreciated.

- Adam

Visual C#7  

PostPosted: Visual C# Language, System User Information Top

accessing the registry will lead to problems - security. you may/may not have access to read/write to/from the registry.

you may be able to use DirectoryServices although not sure, since its been a while for me

what you could do, is post in the WMI newsgroup, once you obtain an answer, im sure we can convert the VBScript into C# code, using WMI or using the DirectoryServices approach dg=microsoft.public.scripting.vbscript