Lee
Lee

Reputation: 31040

How can I suspend/resume a running program from command line in Windows?

I am trying to pause a running program using an OS command script in Windows 7.

After searching StackOverflow/Search-Engines, it seems most suggestions involve the use of sysinternals process explorer in which programs can easily be suspended and resumed using the mouse. However, I would like to use the command line to do the same and cannot figure out how.

Can anyone tell me how to pause/resume programs from the command line?

Note. I am using Windows 7 and MinGW.

Upvotes: 5

Views: 10808

Answers (1)

Wug
Wug

Reputation: 13196

Check out SysInternals PsSuspend:
https://learn.microsoft.com/en-us/sysinternals/downloads/pssuspend

To suspend, use this.

PsSuspend ProcessImageName.exe

To resume the process, use this command.

PsSuspend -r ProcessImageName.exe

Upvotes: 10

Related Questions