Hi all,

I tried starting my QProcess in my service but it doesn't work, although it works nicely in an other program without service.
I want by my service to execute an other program.
there is the same code i userd in the service and the simple program :

Qt Code:
  1. if(m_pProcess == NULL)
  2. {
  3. m_pProcess = new QProcess;
  4. m_pProcess->setEnvironment( QProcess::systemEnvironment() );
  5. m_pProcess->setProcessChannelMode( QProcess::MergedChannels );
  6.  
  7. }
  8.  
  9. if(m_pProcess)
  10. {
  11. bool bValueStart = m_pProcess->startDetached("myProgram.exe");
  12. m_pProcess->waitForStarted();
  13. if(bValueStart)
  14. {
  15. qDebug()<< "OK";
  16. return OK;
  17.  
  18. }
  19. else
  20. {
  21. qDebug()<< "ERR";
  22. return ERR;
  23. }
  24.  
  25. }
To copy to clipboard, switch view to plain text mode