0
I am using the following code below:
$wShell = new COM("WScript.Shell");
$exec = $wShell->Run("notepad.exe", 7, false);
exec("C:\inetpub\wwwroot\boxlabel\box_bat.bat") or die ("");
I’d like to execute it without being in background opening the window would literally have to do that?
Like this: https://ping.eu/ping/ ?
– rbz
that any command
– teste1234
If your intention is to run this on the client machine, via JS or PHP is impossible, for security reasons. Either you develop a module to run on the client machine or run in the background on your server.
– DiegoSantos
If you want something running on the machine and in the browser you will have to create a module to run on the machine.
– Atila Silva
I don’t know in windows, but the same example in a *Nix would be:
shell_exec('arquivoaserexecutado &')
The&
causes the process to run in the background, so php will not be stuck waiting for more return as the return was the process ID.– David Dias