Send php command to an open command window

74 Views Asked by At

I want to send a command (EX: ipconfig/all) to an already open command prompt or console.

$out=shell_exec('ipconfig/all');
echo '<pre>'.$out.'</pre>';

This works but runs on its own, I would like to send commands to a cmd that already open [Open CMD]

I have gotten close..

Using sendkeys.bat

Java script it pops up the right window but does not enter the text..

using: sendKeys.bat "Asheron's Call | ACEmulator - v1.57.4468.20231231202603-master-4d73c70 -- Server Binary Update Available" acecommands{ENTER}

Pops up the right window but does not enter the text. Any ideas why?

0

There are 0 best solutions below