1.0.7 • Published 3 years ago

@songyh/win-process v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

win-process

Node.js native addon for find or kill win process. When the window system is unable to use tasklist/taskkill to get the process list or kill the process under some UAC settings, you can use this library

Usage

If you not install window build tools, please install first

npm install --global --production windows-build-tools --vs2015
npm i @songyh/win-process
const winProcess = require('@songyh/win-process')

Api

kill process

killProcess(pid: number): boolean
const winProcess = require('@songyh/win-process')

const isSuccess = winProcess.killProcess(111)

find process id by process name

findProcessId(processName: string): Array<number> | boolean
const winProcess = require('@songyh/win-process')

const pidArr = winProcess.findProcess('chrome.exe')

find process name by process id

findProcessName(pid: number): string | boolean
const winProcess = require('@songyh/win-process')

const pname = winProcess.findProcessName(1)

find process path by process id

findProcessPath(pid: number): string | boolean
const winProcess = require('@songyh/win-process')

const processPath = winProcess.findProcessPath(1)
1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago