I have to run the following command as administrator from PHP:
$salida="sintaxis\insertarlo.exe sintaxis\sumar.cpp";
$respuesta=array();
$estado;
exec($salida,$respuesta,$estado);
but apparently since it is an .exe the command needs to be run as administrator, there is an option for exec or another command to run a command as administrator
I found a way to run the sudo command by downloading the sudo.exe from here https://goharsha.com/blog/sudo-command-prompt/ and adding it to the windows path variable and it would run like this:
If anyone has a better answer please let me know.