?
Solved

Task Manager control

Posted on 2003-03-22
7
Medium Priority
?
175 Views
Last Modified: 2013-11-13
Hello all, is there any way that I can communicate with the windows (I have 2000) task manager in C\C++? I wanted to be able to create a program that will check to see if a process is running, and then be able to start or end it with using the actual task manager. Is this possible? I have never seen it done before. Please try to help. Thanks in advance
0
Comment
Question by:AngrMgmtDdntWork
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 5

Expert Comment

by:burtdav
ID: 8237654
I don't think communicating with taskman is the best way to do deal with processes - the Windows API itself would be how to do that. Why do you want to use taskman?
0
 

Author Comment

by:AngrMgmtDdntWork
ID: 8240102
Hmm, I didnt even think of that... How would I go about controlling tasks with the Windows API?
0
 
LVL 5

Accepted Solution

by:
burtdav earned 320 total points
ID: 8242336
With MS Visual Studio, you probably have tools like Spy++ and Process Viewer - these do the kind of thing you're talking about - note the terminology they use, and see what you can find using the API Viewer tool. Maybe FindWindow or something like that might be useful... find a name, find out about it using MSDN Library or even Google to find examples.

I'd be interested to see how you go. Good luck.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:AngrMgmtDdntWork
ID: 8242703
thank you much, I'm looking into it now. Im gonna give you the points now, even if it doesnt work you got me on the right track. I will post my findings for anyone interested. Thanks again
0
 

Author Comment

by:AngrMgmtDdntWork
ID: 8250047
hmm, looking through all the tools i found that Pview.exe (Process Viewer) does what I want. But my problem is I dont want to use the interface. Anybody ever used it or know of a site where i can find the tags to do what I want. Or if its possible to call it with tags at all. I was thinking something along the lines of

System("c:/VC++directory/tools/pview.exe -KillApp apptobekilled")

or something like that, but I dont know if it will work at all. Thanks for any help,
0
 
LVL 5

Expert Comment

by:burtdav
ID: 8252612
NT/2000 remote process viewer/killer: http://is-it-true.org/nt/atips/atips284.shtml
This is a similar question, with a C++ code proposed solution: http://www.experts-exchange.com/Programming/Programming_Platforms/Win_Prog/Q_20353998.html
And this: http://www.experts-exchange.com/Operating_Systems/WinNT/Q_20366820.html
...says:
Try "PsKill" (free) - it should be able to accomplish that.
http://www.sysinternals.com/ntw2k/freeware/pskill.shtml 
...and:
In Windows resource kit you'll find utilities such as
tlist.exe - to list current processes & PIDs
kill.exe  - to kill a process - works even if Task manager cannot kill the process

I'm still interested in how you finally solve your problem.

Cheers
0
 

Author Comment

by:AngrMgmtDdntWork
ID: 8256705
wow, your full of helpfullness burtday, thank you very much, i'll keep you posted
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Make the most of your online learning experience.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Progress
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question