Reputation: 31040
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
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