views:

296

answers:

1

I'm trying to get a detailed list (containing name, size, and last modified) of all user profile on a local machine. I can find the information by going to Computer->Properties->Advanced->(user profiles)Settings and i'm trying to find a way to pull in that information into my c# program. Thanks for the help!

+1  A: 
  1. In Visual Studio 2008 go to View->Server Explorer.
  2. Then drill down to Servers->[YOUR LOCAL MACHINE]->Desktop Settings
  3. Create new project (e.g. console application)
  4. (Back to Server Explorer) Right click on Desktop Settings node and click on Generate Managed Class menu item. After that a reference to System.Management.dll and new class derived from System.ComponentModel.Component will be added to your project. You can inspect it or use it as is.

Also check WMI Classes and System.Management Namespace to study about management information and events.

Oleg I.