Cannot open Excel.exe



  • Hi,
    I can open calc.exe when a push button is clicked from gui,
    QProcess* process = new QProcess();
    QString program = "c:\windows\system32\calc.exe";
    process->start(program);

    But i cannot open excel.exe.
    QProcess* process = new QProcess();
    QString program = "C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.exe";
    process->start(program);

    Is there any admin settings? Where I am going wrong?


  • Moderators

    I don't know your use case, so I may be wrong, but you should consider using eithee QProcess::startDetached() or (better) QDesktopServices::openUrl()

    Also, you should use Unix paths in Qt, so the URLs should be:

    QString program("C:/windows/system32/calc.exe");
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.