prcview.com (gone as of 2016-02-12, archive)
Command line utility allows automating common task like figuring out if particular process is running or killing a running process on scheduler. Has a GUI version.
I've never really used it, but it's stayed in my toolkit because it's under a megabyte.
- Tested PrcView GUI 220.127.116.11, commandline 18.104.22.168, on 2014-04-24 on Windows 8.1, updated recently.
Tested PrcView GUI 22.214.171.124, commandline 126.96.36.199, on 2016-02-12 on Windows 10, updated recently.
Its commandline documentation ∞
Checking if a particular process is running is easy. For example the following command will show all instances of explorer that are running:
Setting a process priority is another common task. To set explorer priority to normal just type:
pv –pn explorer.exe
or if you like a 'verbose' style
pv -p"Normal" explorer.exe
pv supports the common
? wildcards so that the following command
will perfectly work by printing out all the processes starting with
Don't like a particular process and would like to kill it? The following
command will do the job:
pv –k thisprocess.exe
And if you don't like additional questions and would like to force killing:
pv –kf thisprocess.exe
Don't like this particular instance of the process and know the window title? The following command will do the job (please note that
\ need to be represented as a
\\ combination if you enter it from the command line):
pv -k thisprocess.exe -w"c:\\"
pv.exe can be easealy executed from a batch file to check if process is running.
When writing a command file please note that the ERRORLEVEL number specifies a true condition if the last program run returned an exit code equal to or greater than the number specified.
The following script illustrates how this could be done:
@echo off pv.exe %1 >nul if ERRORLEVEL 1 goto Process_NotFound :Process_Found echo Process %1 is running goto END :Process_NotFound echo Process %1 is not running goto END :END
Please note that redirecting standard errors by using
2>file_name does not work under 9x Windows. Please use
2>file_name instead. This notation will be processed by
PrcView v 188.8.131.52 command line utility by Igor Nys Usage: pv -[<MODE>] -[<OPTIONS>] <ARGUMENTS>...-[<OPTIONS>] Modes: -h,-? --help display this help information -k --kill kill PROCESS -a --activate activate PROCESS -c --close close (send WM_CLOSE) to the PROCESS -m --module show modules used by specified PROCESS -g --getenv get startup environment for the PROCESS -p[nihr] --priority set priority to "Normal", "Idle", "High", "Real Time" [ba] "Below Normal" and "Above Normal" only on W2K or higher -t --tree display process tree, -te for computer-readable format -u --usage show processes that uses specified MODULE -s --summary show MODULE usage summary Options: -f, --force never prompt -e, --extend show additional information if available -i, --id use process ID instead of the PROCESS name -q, --quiet supress headers and produce a tab-separated list -d[time] --delay delay time in milliseconds before executing command -l[mask] --long include process command line -w[mask] --window show only processes with visible windows, -e show hidden -r --repeat repeat command in a cycle Arguments can contain '*' and '?' wildcards. Process return code (%ERRORLEVEL%) can be used in batch files 0 - process found, 1 - empty result set, 2 - programm error
Examples of use ∞
|pv myprocess.exe||get process ID for myprocess.exe.|
|pv -e||get extended list of running processes.|
|pv -k sleep*||kill all processes starting with "sleep"|
|pv -m -e explorer.exe||get extended information about explorer's modules|
|pv -u oleaut*.dll||list of all processes that use matching dll|
|pv -ph w*.exe||set priority to hight for all matching processes|
|pv explorer.exe -l"*/S"||looks for explorer process with /S switch|
Would like to add an example? Found any errors? Please write at support at prcview.com or contact me directly at igornys at writeme.com
LIABILITY DISCLAIMER -- READ BEFORE using pv.exe
The software is provided "as-is" and without warranty of any kind, expressed, implied or otherwise, including and without limitation, any warranty of merchantability or fitness for a particular purpose. in no event shall the author or his company be liable for any special, incidental, indirect or consequential damages whatsoever (including, without limitation, damages for loss of profits, business interruption, loss of information, or any other loss), whether or not advised of the possibility of damage, and on any theory of liability, arising out of or in connection with the use or inability to use this software.