5

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.

Lee
  • 29,398
  • 28
  • 117
  • 170

1 Answers1

10

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
DxTx
  • 3,049
  • 3
  • 23
  • 34
Wug
  • 12,956
  • 4
  • 34
  • 54