pv.exe – PrcView command line utility allows automating common task like figuring out if particular process is running or killing a running process on scheduler. Checking if a particular process is running is easy. For example the following command will show all instances of explorer that are running: pv explorer.exe Setting a process priority is another common task. To set explorer priority to normal just type: pv –pn explorer.exe pv supports the common ‘*’ and ‘?’ wildcards so that the following command will perfectly work by printing out all the processes starting with ‘e’ pv e* 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 explorer.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 If you just want to wait till specific process is running, the command below will make such check for the "notepad.exe" every second, pv will exit when the process is there. pv -r0 -d1000 notepad.exe now you can wait for the process completion by using: pv -x notepad.exe 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 pv.exe. And finally a copy of the -? command (please note that -o and -y options are not supported on Windows 9x/Me): pv displays information about the running processes. pv v 5.2.1.2, Copyright (c) Igor Nys, 2000-2006. Usage: pv -[