Re: starting a program without waiting for it to terminate

From: Date: Thu, 31 Oct 2002 17:59:19 +0000
Subject: Re: starting a program without waiting for it to terminate
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-16636@lists.php.net to get a copy of this message
Patrick wrote:
hi i'm running apache 2.0.43 and php4.2.3 on win2k. what i need to do in my php script is to start some windows executable. but as it's taking quite a bit until it terminates i want php to continue without waiting for it. i tried lots of stuff but nothing worked and i'm quite desperate now. is there any way or am i trying in vain ? thx, patrick
This only works on Windows and requires the Windows Scripting Host, but tends to work better than messing with the exec, execshell etc. commands in PHP. The second argument is whether it should be launched normally (1), minimized (2), or maximized (3). The 3rd argument is whether to wait or not. 0 is to NOT wait. $shell = new COM("WScript.Shell"); $shell -> Run('c:/windows/notepad.exe',2,0);

« previous php.windows (#16636) next »