GTBuilder
19th February 2008, 02:26
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.
void Clone::selectDriveC()
{
if( driveOnoff)
{
QStringList args;
args << "/k" << "test.bat";
twProcess.start( "cmd.exe", args);
driveOnoff = false;
}
}
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? :confused:
void Clone::selectDriveC()
{
if( driveOnoff)
{
QStringList args;
args << "/k" << "test.bat";
twProcess.start( "cmd.exe", args);
driveOnoff = false;
}
}
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? :confused: