Check if a process is running from a batch file? Answered
I need a command simmilar to “IF EXIST” to check if a process, such as wmplayer.exe is running. Something like this.
if exist wmplayer.exe (echo proccess running) else (echo proccess not running
Can you think of anything?
**I thought I was close with this, but I can't get it to work.**
IF ”%notepad.exe%”==”” (echo The process is not running) ELSE (echo the program is running)
With it set up like this it always says the process is not running
IF ”%notepad.exe”==”” (echo The process is not running) ELSE (echo the program is running)
With this it aways it running.
Any ideas on how to get it to work? I know I’m really close.