Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default get the program id of an excel application from the task manager

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default get the program id of an excel application from the task manager

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default get the program id of an excel application from the task manager

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel close on startup, but stay in task manager Thomas Excel Discussion (Misc queries) 3 May 20th 10 06:58 AM
Excel still running in task manager after closing the application Willem Excel Discussion (Misc queries) 0 December 5th 06 01:56 PM
Printing leaves EXCEL.EXE process in Task Manager eeidfn Excel Discussion (Misc queries) 1 February 28th 06 02:24 AM
Task Manager and Excel 2003 Mike Excel Discussion (Misc queries) 1 April 20th 05 10:40 PM
Excel Remains Active in Windows Task Manager Philip Wybo Excel Programming 2 August 27th 03 09:30 AM


All times are GMT +1. The time now is 06:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"