Win 2008 server, php, exec

P
На сайте с 16.07.2009
Offline
101
646

Не могу заставить exec запускать приложения (paint, notepad и т.д.).

Нужна консультация, платно. icq двa764584дBa9

FeoOne
На сайте с 27.12.2008
Offline
32
#1

start Notepad.exe minimized in the background:

<?php
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("notepad.exe", 7, false);
?>

start a shell command invisible in the background:
<?php
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("cmd /C dir /S %windir%", 0, false);
?>

start MSPaint maximized and wait for you to close it before continuing the script:
<?php
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("mspaint.exe", 3, true);
?>

http://ru.php.net/manual/en/function.exec.php

Есть еще пару извращенских методов под винду, по ссылке они все есть, в комментах.

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий