1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Windowsのコマンドプロンプト(bat)で特定のプロセス(アプリ)停止

Posted at

やり方

『notepad.exe』という名前のプロセスを強制停止
C:\Windows\System32\cmd.exe /C taskkill /IM notepad.exe /f

/IM

/IM によって停止するプロセスを名前で指定できます。

プロセス名は taslilist の結果の『イメージ名』で確認できます。
image.png

例えば下記のように同じ名前のプロセスが複数あった場合は、例外にならず、2つとも停止されます。
image.png

/PID

プロセスIDで指定したい時は /PID

/f

/f は強制の意味。
タスクスケジューラー登録で実行されているアプリの場合 /f つけないと終了できない場合があります。

参考サイトさん

バージョン

Microsoft Windows [Version 10.0.19045.3570]

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?