Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am able to kill running processes which show up in the task manager but there are some games like KnightOnline and Metin2 that don't show up in task manager and so I can't kill them. I've been searcing for a solution but couldn't find. This is an internet cafe software and I just want to close all programs and games when a customer leaves so that the new customer will have a fresh desktop.

As windows automaticly closes everything, I thought of ending the session and reloging but that doesn't seem to be easy and not the best way.

Waiting for your valuable comments

share|improve this question
add comment

migrated from stackoverflow.com Apr 8 '11 at 10:44

This question came from our site for professional and enthusiast programmers.

4 Answers

If you can't find your application in the Applications tab then in the Task Manager switch to the second tab "Processes" find your desired application process then press "End Process", normally all processes have names similar to their applications, see the image below:

Steps

share|improve this answer
add comment

Use ProcessExplorer - http://technet.microsoft.com/en-us/sysinternals/bb896653 to check all processes and close what you want. It should show you every application on every account -if you have administrator rights of course.

To kill it programatically check this post: How to kill a C# process?

When you don't know name of process, but you know name of executable that is run on your computer ( C:...\Metin.exe) then you can iterate through all processes and search for process that in list of loaded modules (Modules property) has module with name of your executable (FileName property in ProcessModule class) . Maybe it helps.

share|improve this answer
    
Actually, I'm looking for a way to do it by code –  teknolog Apr 7 '11 at 19:41
    
So describe your needs in question... –  Korin - Marek K. Apr 7 '11 at 19:44
    
my question was "Kill process that doesn't show up in task manager" What's wrong with it? It already explains –  teknolog Apr 7 '11 at 19:46
    
"Hi, I am able to kill running processes which show up in the task manager but there are some games like KnightOnline and Metin2 that don't show up in task manager and so I can't kill them" - doeas it tell us that you want to kill it by code? It only describe that you have problems with task manager. –  Korin - Marek K. Apr 7 '11 at 19:47
    
okay sorry, as I mentioned that it was an internet cafe software and put the c#4 tag below, I thought you could undestand that it was a programming question –  teknolog Apr 7 '11 at 19:49
show 2 more comments

There is Kill method in Process. You may use it in such way:

var procs = System.Diagnostics.Process.GetProcesses(); // Get all processes in the system
procs[0].Kill();

There is also GetProcessesByName method with help of wich you can obtain pricesses by their names:

var procs = System.Diagnostics.Process.GetProcessesByName("firefox");
share|improve this answer
    
thanks but it doesn't help me with hidden processes –  teknolog Apr 7 '11 at 20:51
    
Are you sure that your processes is really hidden? Is it true that processes isnt visible even if you press "Show processes from all users"? It also may be that KnightOnline and Metin2 have process names different from their program names –  Anton Semenov Apr 8 '11 at 7:11
add comment

From a command line do

"tasklist | more"

pay attention to the PID (for instance 123)

to kill the item do

"taskkill /f /pid 123"

The benefit is that these commands also work on remote systems.

"tasklist /s <systemname> /u <domain>\<user>"

same for taskkill

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.