Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot open Excel.exe
Qt 6.12 LTS is out! See what's new in the release blog

Cannot open Excel.exe

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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");
      

      (Z(:^

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved