I use wmic like the following code.But It start this cmd error,and return after call p.waitForStarted.
Does sb kown why?
Code:
QString cmdTask = "wmic.exe /OUTPUT:STDOUT process where name=\"startServer.exe\" get executablepath";
Code:
QProcess p; p.start(cmd); if (!p.waitForStarted()) { } if (!p.waitForFinished()) { } int res = p.exitCode(); if (res) { //error } return out; }