Log Processes from Task Manager

  • Thread starter Thread starter Powerguy
  • Start date Start date
P

Powerguy

Hi,

I am trying to write a program that is able to track an log the usage
of a particular process (such as Excel.EXE) from within the task
manager. The basic information that I need is:

1. Who Started the Process
2. What time they finished using the process.

To get started I am looking for any code/ideas of how to extract the
process information from the task manager.

Any help would greatly be appreciated!

PowaGuy
NEW TO VB.net!
 
Powerguy said:
To get started I am looking for any code/ideas of how to extract the
process information from the task manager.

You would use the System.Management namespace to extract the information
from WMI.

There's an MSDN magazine article on this here

http://msdn.microsoft.com/msdnmag/issues/02/05/WMIMan/

The System.Management namespace is documented here:

http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemmanagement.asp

The WMI class you would need is Win32_Process, which is documented here:

http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_process.asp

/Jens
 
Back
Top