obtaning running applications on my PC

inti

Newcomer
Joined
Feb 11, 2003
Messages
3
HI all

How I can obtain the applications that are running on my Pc?
I already have the process that are running, but I don't find
the way to obtain the applications for example winword, notepad, explorer, etc.
just like its appearing in the tasks administrator.


Thanks
 
You need the MainModule property of the Process class, then the FileName property of that. Bear in mind that you'll have to check if MainModule is null (Nothing in VB.NET) because some processes don't have main modules.
 
Getting all the Window Titles

Thank you.

I need the Window Title of all the applications that are running on my PC. I am using the MainWindowTille property but I can't get all the Window Titles that have the same proccess ID.

Thanks again.
 
I'm not sure I understand what you're trying to do. You said you are using the MainWindowTitle property, what is the problem? You want to get the titles of all windows owned by the process in question?
 
Gettint all Window Titles

Thanks.

The problem is that if I have an opened document (a word document for example) and I open another document of the same application using the option open of that application (another word document) I can't obtain the second Window Title just like its appearing in the Task Manager. I can obtain only one that is the main I supose but I need all the Window Titles.

Thanks again.
 
This is an interesting topic and I'll be interested in seeing what divil comes up with. Your problem seems to be unique to the application in question. For instance, with Word there is only one process and the MainWindowTitle appears to change depending on what the top window is. On the other hand, Internet Explorer seems to launch seperate processes and allows you to see both. Sounds like you've already made it this far in your efforts but the ProcessController sample app is really interesting. Thanks for piquing my curiosity:)
 
Back
Top