0

I have two issues in my application which i would like to implement:

  1. Define two lists of local users: administrators and non-administrators
  2. Get desktop folder path to a non-administrator user

How i could do it in c#?

OBS: I already tried to use ManagementObjectSearcher with the Win32_UserAccount and Win32_GroupUser, but i don't know cross them to define who(user) belongs to an administrator group.

Felipe
  • 75
  • 2
  • 6
  • Try and do some research before you ask questions. This took me 2 minutes to find/answer. Question 1 is a possible duplicate of [How can I get a list Local Windows Users (Only the Users that appear in the windows Logon Screen)](http://stackoverflow.com/questions/12749537/how-can-i-get-a-list-local-windows-users-only-the-users-that-appear-in-the-wind). Question 2, to get the desktop folder its `string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);` – Jeremy Thompson Sep 11 '14 at 05:03
  • Yes, i already used the code of your link, but it not helped for me in totality. Someone could has another way to do it, i hope. I need the two issues working together. – Felipe Sep 11 '14 at 05:44

0 Answers0