Open .exe with PHP

I would like a PHP command to open an .exe that will be in the same folder as my application, and a PHP command to close the .exe

Here you have a good start:
https://www.exeoutput.com/help/working-with-php/php-exec-system/

pclose(popen("start /B ". $cmd, “r”));

Closing a running EXE is not an easy task. If you are not the author of the EXE, you’ll have to kill the process.

1 Like