php How do I start an external program running – Having trouble with system and exec

Another super late answer, but this comes up on Google when searching for “php run gui program”…

I have been able to launch a GUI app in Windows 8.1 by making, running and deleting a scheduled task:

shell_exec('SCHTASKS /F /Create /TN _notepad /TR "notepad.exe" /SC DAILY /RU INTERACTIVE');
shell_exec('SCHTASKS /RUN /TN "_notepad"');
shell_exec('SCHTASKS /DELETE /TN "_notepad" /F');

Leave a Comment