WMCI - how to get the ERRORLEVEL
- by murxx
Hi,
I want to use the "wmic" command for finding out if a specific java process is still up and running.
E.g. wmic process where "commandLine like '%ACTMonitor%' and executablePath like '%PATH1%' and name like '%java%'"
The problem now is that the errorlevel of this command is always 0, no matter if there is a process listed or not. How can I manage to get an errorlevel != 0 in case the process is not up anymore?
Or can one of you tell me another suggestion on how to be able to continue in a .bat script with this information...
Thanks in advance!