Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi there,
i have this problem. i have an application written in delphi that fires up excel applications, so these applications get a PID from the system. what i need to do is to kill the excel applications by getting their PID from task manager!!!!!!!!!! how do i do that? thanks a lot nikos ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Tue, 14 Oct 2003 08:48:33 -0400, nikolaosk
wrote in microsoft.public.excel.programming: hi there, i have this problem. i have an application written in delphi that fires up excel applications, so these applications get a PID from the system. what i need to do is to kill the excel applications by getting their PID from task manager!!!!!!!!!! how do i do that? I don't know anything about Delphi's capabilities; there are a whole bunch of Delphi related newsgroups, i.a. at borland.public.delphi..., maybe they can provide a specific answer. But as Delphi can obviously spawn other processes, you could probably use TLIST and KILL from the NT Resource Kit, or pslist and pskill from the PsTools set <http://www.sysinternals.com/ntw2k/freeware/pstools.shtml. -- Michael Bednarek http://mcmbednarek.tripod.com/ "POST NO BILLS" |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don't know about delphi but on a WinXP or Win2k system you should be able to
use wmi. For example, this sub run in VBA would reveal the PID of a running instance of Excel. Sub getPID() For Each Process In GetObject("winmgmts:{impersonationLevel=impersonat e}").InstancesOf("Win32_pr ocess") If Process.Name = "EXCEL.EXE" Then MsgBox Process.Handle End If Next End Sub Steve "nikolaosk" wrote in message ... hi there, i have this problem. i have an application written in delphi that fires up excel applications, so these applications get a PID from the system. what i need to do is to kill the excel applications by getting their PID from task manager!!!!!!!!!! how do i do that? thanks a lot nikos ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel close on startup, but stay in task manager | Excel Discussion (Misc queries) | |||
Excel still running in task manager after closing the application | Excel Discussion (Misc queries) | |||
Printing leaves EXCEL.EXE process in Task Manager | Excel Discussion (Misc queries) | |||
Task Manager and Excel 2003 | Excel Discussion (Misc queries) | |||
Excel Remains Active in Windows Task Manager | Excel Programming |