Tell me, please, why the teamsc query type= service | find /c "SERVICE_NAME: MySQL"
sc query type= service | find /c "SERVICE_NAME: MySQL"
returns, as expected, 1, and the commandFOR /F %g IN ('sc query type= service ^| find /c "SERVICE_NAME: MySQL"') do echo %g
returns 0.
While the teamFOR /F %g IN ('net start ^| find /c "MySQL"') do echo %g
again, as expected, returns 1. What is wrong with the second command?
|