QProcess start automaticaly needed application
Hi everybody,
OS: WINXP
Compiler: MINGW
QT: 3.4
The following code works perfect. My problem is that office is installed on machines in different path for example: "C\Program files\Office" or "D:\Office"
How could i be sure that my file can be opened with EXCEL in every Machine?
Code:
p->addArgument("D:\\Apps\\Microsoft Office\\Office10\\excel.exe");
p->addArgument("W:\\inventar\\Reports\\" + fileName);
p->start();
THX
Re: QProcess start automaticaly needed application
Why not let windows handle it?
from a dos box you can do "start bla.xls" and windows will use whatever default program is associated with it... I'm not too familiar with win32 programming but I would think theres some sort of API call to handle that.
At least it's not considered good design if your application needs to "know" the physical location of external apps. That's what default application bindings are for :)