Wrapper for the Windows
taskkill
command. Ends one or more tasks or processes.
Port of taskkill
Note: Test is incomplete (Welcome for PR) due to "Bad resourse ID" denoland/deno#4830 denoland/deno#2703 denoland/deno#2692
deno install --allow-run -f --name taskkill "deno.land/x/win_taskkill/cli.ts"
$ taskkill --help
Usage
$ taskkill [<pid> …]
Description:
Wrapper for the Windows command. Ends one or more tasks or processes.
Options:
--help -h, - Show this help.
--force - Forcefully stop process.
--tree, - Terminate all child processes.
--system, - Name or IP address of a remote computer.
--username, - User specified by User or Domain\User.
--password, - Password of the user account.
--filter, - Types of processes to termination.
Examples:
$ taskkill 1337
$ taskkill 1337 --force
$ taskkill --force --filter "USERNAME eq NT AUTHORITY\SYSTEM"
$ taskkill --system srvmain --force
$ taskkill --system srvmain --username maindom\hiropln --password p@ssW23
import { win_taskkill } from "deno.land/x/win_taskkill/mod.ts";
// or
import win_taskkill from "deno.land/x/win_taskkill/mod.ts";
(async () => {
await taskkill([4970, 4512]);
})();
See the taskkill
docs for more.
Returns a Promise
.
Type: number[] | string[]
One or more process IDs or image names, but not mixed.
The system
, username
, password
options are mutually inclusive.
Type: string
Name or IP address of a remote computer (do not use backslashes). The default is the local computer.
Type: string
User specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command.
Type: string
Password of the user account for the specified username
.
Type: string
Types of processes to include or exclude from termination.
See the taskkill
docs for supported filters.
Type: boolean
Forcefully terminate processes. Ignored for remote processes as all remote processes are forcefully terminated.
Type: boolean
Terminate all child processes along with the parent process, commonly known as a tree kill.
- taskkill - Wrapper for the Windows
taskkill
command. Ends one or more tasks or processes.