You can use WMI to do this. It's very easy to get a process list along with it's current snapshot CPU utilization. Check Win32_Process in the MSDN documentation.
>Here was my problem.
>
>The customer called me and said my VFP application was running slowly. Come to find out their was a virus that norton's did not catch and it was chewing up 100% of the processor. Of course I could not login to the customer to see the problem because it was not responding to PCAnywhere. I had the customer reboot the computer and that did not help because the virus loaded into memory at bootup. What I would like to do is have the customer snap-shot his system processes and CPU usage and email it to me. Come to find out I spend a lot of tech time when the problem was not even mine and I was looking for a logging method say 5-10 seconds to see what was in memory and what CPU usage was being used. I know how to get the processes and threads and even how to kill them, but I don't know how to get the CPU usage. Any ideas? Has anyone tried this?
>
>Thanks,
>Dale