I'm writing a simple widget to aid in the installation of software applications. A series of commands need to be implemented such as creating a directory, copying files, running an application, etc. To do this I launch MS-DOS and a command file.

Qt Code:
  1. void Clone::selectDriveC()
  2. {
  3. if( driveOnoff)
  4. {
  5. args << "/k" << "test.bat";
  6. twProcess.start( "cmd.exe", args);
  7. driveOnoff = false;
  8. }
  9. }
To copy to clipboard, switch view to plain text mode 

Where cmd.exe and test.bat are in the parent directory.

The command file performs all the necessary tasks. However the DOS window never appears so I can't display text for the user and can't use pause.

I can get a DOS window by using startDetached, but then I get no QProcess::finished() signal which I need in the application.

Task Manager never shows that the cmd application is running although the QProcess::state() == 2.

Any suggestions?