Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 176
  • Last Modified:

Task Manager control

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
AngrMgmtDdntWork
Asked:
AngrMgmtDdntWork
  • 4
  • 3
1 Solution
 
burtdavCommented:
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
 
AngrMgmtDdntWorkAuthor Commented:
Hmm, I didnt even think of that... How would I go about controlling tasks with the Windows API?
0
 
burtdavCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
AngrMgmtDdntWorkAuthor Commented:
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
 
AngrMgmtDdntWorkAuthor Commented:
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
 
burtdavCommented:
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
 
AngrMgmtDdntWorkAuthor Commented:
wow, your full of helpfullness burtday, thank you very much, i'll keep you posted
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now