I want to open a Windows program (e.g. notepad.exe) when I click a link on website. I tried using the php commands shell_exec() and exec(), but both will not open the Windows program. This is the code that does not work:
$command = "c:\\windows\\system32\\notepad.exe";
echo shell_exec("$command");
In the past I have been using a similar code for making a backup of a database:
$command = "d:\\xampp\mysql\bin\mysqldump --opt -h $hostname -u $username $db > $backup_file";
echo shell_exec("$command");
This code works as expected (the backup is created).
I suspect that the mysqldump is running in the background while notepad.exe is not. Is there a solution for this issue?