Skip to content

salmoro/win-pause

Repository files navigation

Win Pause

Pause & resume windows processes with Node

A node wrapper for PsSuspend

npm version Build Status Coverage Status

ATTENTION: By running this module you'll be be programmatically accepting the EULA of PsSuspend. Please be sure to read the Eula here before proceeding.

Supported OS

Client: Windows Vista and higher.
Server: Windows Server 2008 and higher.

Installation

Install WinPause via NPM:

npm i win-pause

Usage

If you already have PsSuspend on the machine:

import { pause, resume } from 'win-pause';

const binPath = 'my-path/pssuspend.exe';
const pid = 9020;

pause(pid, binPath)
    .then(() => console.log('successfully paused!'));

resume(pid, binPath)
    .then(() => console.log('successfully resumed!'));

Otherwise:

import { pause, resume, downloadPsSuspend } from 'win-pause';

const pid = 9020;

downloadPsSuspend()
    .then(() => {
        pause(pid)
            .then(() => console.log('successfully paused!'));
        
        resume(pid)
            .then(() => console.log('successfully resumed!'));
    })

Test

npm test

About

Pause a windows process with Node

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published