0

I am trying to execute following command and trying to get the output however I am getting output as null.

    QProcess process;
    process.start("cmd /c \"ipconfig\"");
    process.waitForFinished(-1);
    QByteArray out = process.readAll();
    QString testStr = QString::fromUtf8(out);

Can someone please tell me where am I doing wrong?

sk110
  • 77
  • 2
  • 9

1 Answers1

0
process.start("C:\\Windows\\System32\\cmd.exe /c \"ipconfig\"");
Pang
  • 9,564
  • 146
  • 81
  • 122
Edward
  • 149
  • 7