note 70564 added to class.com

From: Date: Fri, 20 Oct 2006 13:39:17 +0000
Subject: note 70564 added to class.com
Groups: php.notes 
Request: Send a blank email to php-notes+get-118843@lists.php.net to get a copy of this message
Hi all, I'm facing some problems due closing the MS Word process. I use PHP 4.3.2 on a Windows platform. This is the php code i've used: <?php $word = new COM("word.application") or die("Cannot start Word."); $word->Quit(); $word->Release(); $word = null; ?> If I execute this script, a WINWORD.EXE shows up in the list of the Task Manager. This means that the WINWORD.EXE process is running. The script works. (At least so far). The problem is that this process is not closing. So if I execute the script again, another WINWORD.EXE process show's up in the process list of the Task Manager. Is there a way to get the PID of this process trough a COM function or to get a process list of the processes executed by the current script, including information like PID, process name etc? NOTE: Each WINWORD.EXE process get's it's own PID. If there is a way to get the PID of the process executed by the current script, I could close it manually by using the following PHP function: <?php shell_exec(<kill program> <PID>/<PROCESS NAME>); ?> If there is another way to close the MS Word (WINWORD.EXE) process, please send me a note. Best regards, S. Kolic ---- Server IP: 83.137.20.120 Probable Submitter: 62.58.152.186 (proxied: 1.0 192.168.0.22, 1.0 Symantec_Web_Security (3.0.0.52)) ---- Manual Page -- http://www.php.net/manual/en/class.com.php Edit -- https://master.php.net/note/edit/70564 Del: integrated -- https://master.php.net/note/delete/70564/integrated Del: useless -- https://master.php.net/note/delete/70564/useless Del: bad code -- https://master.php.net/note/delete/70564/bad+code Del: spam -- https://master.php.net/note/delete/70564/spam Del: non-english -- https://master.php.net/note/delete/70564/non-english Del: in docs -- https://master.php.net/note/delete/70564/in+docs Del: other reasons-- https://master.php.net/note/delete/70564 Reject -- https://master.php.net/note/reject/70564 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118843) next »