Search code examples
winapiwmiaccounts

how to get the user accounts and buit in security principles in windows


alt text http://www.freeimagehosting.net/uploads/b350914deb.png

i want to retrieve the list of user and local service and network service


Solution

  • You can do this via WSH. Here is an example in JavaScript: http://www.winscripter.com/WSH/ADSI/56.aspx

    and a sample in C#: http://www.geekzone.co.nz/chakkaradeep/3938

    I found several answers on BING by searching win32 list user accounts

    And finally a sample from Microsoft: http://gallery.technet.microsoft.com/ScriptCenter/en-us/827623f5-eb55-4035-8f57-25c4afb444cd