0.2.0 • Published 8 years ago

win-processes v0.2.0

Weekly downloads
9
License
MIT
Repository
github
Last release
8 years ago

win-processes npm version

Node module for working with windows processes

Simple few commands that can be used to interact with Windows processes. Feel free to add, fix and contribute

Examples

var wProc = require('win-processes').wproc;

Read full list of processes

wProc.list().then(function (result) {
        gUtils.log(result);
    })

Check if process is running

wProc.isRunning("processName.exe").then(function (result) {
        if (result){
            console.log("Process is running");
        }else {
            console.log("Process is not running");
        }
    });

API

Class: WinProcessesContext

WinProcessesContext.IsRunning(processName)

Checks if process is currently running

Returns: Promise, Promise with resulting boolean

WinProcessesContext.List()

List all current processes

Returns: Promise, Promise with resulting WinProcess array

WinProcessesContext.Find(condition)

Find specific process depending on a search function

Parameters

condition: function, Search callback. This function should contain the condition and every item will be tested against it. Returns boolean.

Returns: Promise, Promise with resulting WinProcess array

WinProcessesContext.Kill(pids)

Kill a process

Parameters

pids: string | string[], One or many PIDs of processes to be killed

Returns: Promise

WinProcessesContext.KillByName(name)

Kill a process

Parameters

name: string, Name of the process to be killed

Returns: Promise

Class: WinProcess

ImageName:

PID:

SessionName:

SessionNumber:

MemoryUsage:


0.2.0

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago