0

I'm studying C++ and I have to kill a process (my program I made).

But I cant see the process in the Task Manager so I googled how could I kill it from command prompt.

When I try to kill:

taskkill /IM mycpp.exe /f

It says I have no rights to do so. (Access denied)

I'm the only one using this computer, how could I give myself access to this killing command?

  • Run command prompt as Administrator? – canadmos Jan 3 '14 at 17:32
  • How are you starting your process? Does your IDE/compiler... run as Administrator? – chrki Jan 3 '14 at 17:32
  • I ran cmd as Administrator, as of this, i should be easily terminate the process with no doubt. – Adam Varhegyi Jan 3 '14 at 17:39
  • what is the value for 'session' when you run tasklist | findstr mycpp.exe (note that case is important to findstr). – Frank Thomas Jan 3 '14 at 17:40
  • 1
    @AdamVarhegyi download process explorer (technet.microsoft.com/en-in/sysinternals/bb896653.aspx), run it (Run As Administrator) and paste a screenshot of the entry for your exe in process explorer – Ganesh R. Jan 3 '14 at 18:38
2

You can download Sysinternals Process Explorer, run it (Run As Administrator). It will show you a list of user mode processes running on your system.

You can use it to terminate your process when you find it.

Alternatively, you can create a batch file and call Sysinternals PSKill which allows you to specify an executable name which it then terminates. (The batch file may need to be run as Administrator)

0

There are processes that will block attempts to be killed. Software like Antivirus will install drivers that will prevent you to kill it. Depending on version of Windows it might be possible to boot into safe mode and to kill task that way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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