9

I have a problem with a specific application that I am executing. The application is full-screen in the foreground. About once per day, it hangs. When it does, I can only open start menu. I cannot kill the app through Task Manager, as Task Manager opens in the background. So, as the process always has the same name, I thought to put a "kill switch" for it into the start menu. However, on the internet I only find commands to kill by PID, and the PID changes fo each execution.

Any idea on that?

2
  • 6
    Killing by the name of … fork you, I won't let you kill me. (SCNR) – Jörg W Mittag Sep 2 '19 at 9:43
  • See examples with taskkill /? – Mayra Delgado Sep 2 '19 at 13:33
14

The /IM parameter for taskkill does that. For example a link file with the target: C:\Windows\System32\cmd.exe /C "TASKKILL /IM notepad.exe" would kill all processes with the name notepad.exe.

5

Create a batch file and use the command Taskkill, then create a shortcut to that batch file and place it in the Start Menu. So, write a batch along the lines of:

@ECHO OFF
taskkill /IM firefox.exe /F

Then create a shortcut link to it in the Start Menu. /F is to force terminate.

Reference: Microsoft Doc taskkill for syntax, The Windows Club article on How to force close a program for an example.

3

As that process takes over the entire screen, you cannot use desktop icons or the Start Menu. Some advice:

  • Use the keyboard shortcuts Alt+M or Alt+D to minimize the process. If that doesn't help:

  • Set the Task Manager to be topmost by its menu Options > Always on top

  • You may use the Task Manager menu File > Run a new task to run a command such as taskkill /IM /F process.exe to kill the process. Task Manager will remember the command so the next time you will not have to type it again.

1

Use the keyboard shortcut Ctrl+Shift+Esc to start the taskmanager, or to bring it to the foreground if already running. If taskmanager is set to be always-on-top, then it will come on top of the process you want to kill. You can then kill the hanging process.

1

You can still use the task manager, just in a new virtual desktop instance.

Open the task manager as you would normally. The task manager will then open in the background of the fullscreen application, as you mentioned.

You just then need to use the keyboard combination Win + Tab to open the tab browser overlay.

In the tab browser, right-click on the task manager and choose Move to > New desktop...

This will send the task manager to a new virtual desktop instance, you can also navigate to this new desktop instance through the tab browser. Since your full-screen application is not operating on this new virtual desktop, you can operate with the task manager as you like.

Of course, you can do it the other way around as well, by firstly creating a new virtual desktop instance in the tab browser and then opening the task manager there.

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.