win-pause

1.0.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i win-pause

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

11.3 kB

Total Files

18

Last publish

Collaborators

  • salmoro