How to execute a process with QProcess
-
Hi, I have a program in my project directory which is called PsExec.exe. I wanted to execute this process with the parameter "//machine cmd.exe". I written the following code but it doesn't work:
QString program = "PsExec"; QString arguments = "\\\\"; arguments.append(f_targetComputerName); QStringList argumentList; argumentList << arguments << "cmd.exe"; QProcess *myProcess = new QProcess(this); myProcess->start(program, argumentList);
-
Hi,
What errors do you get ?
What is the final list of arguments ? -
QProcess offers several APIs to get the output of the application you executed, its status, error informations. Did you use them ?
-
QProcess offers several APIs to get the output of the application you executed, its status, error informations. Did you use them ?
-
Well... Use QProcess's API to get that information.