killing a process by window title; was: socket application
by Jonathan Epstein other posts by this author
Jan 28 2003 9:53PM messages near this date
view in the new Beta List Site
Re: socket application
|
RE: PPM install local files (Was: Win32-GUI - Manage Window Objec
ts...?)
This seems like a useful starting point, courtesy of Dave Roth:
http://www.roth.net/perl/scripts/scripts.asp?ProcList.pl
In Python, I sometimes use one of the distribution scripts called killProcName.py. Here's a
n excerpt which can probably be translated to Perl without too much difficulty:
handle = win32api.OpenProcess(win32con.PROCESS_TERMINATE, 0,pids[0])
win32api.TerminateProcess(handle,0)
win32api.CloseHandle(handle)
I believe that it should be possible to synthesize these two pieces of information and produ
ce a solution.
Jonathan
At 03:34 PM 1/28/2003 -0600, Dirk Bremer (NISC) wrote:
> ----- Original Message -----
> From: "Gerber, Christopher J" <Christopher.J.Gerber@[...].com>
> To: "'Dirk Bremer (NISC)'" <dirk.bremer@[...].cc>
> Sent: Tuesday, January 28, 2003 15:25
> Subject: RE: socket application
>
>
> > Dirk,
> >
> > I had hacked together something like this in C at one point. I think I
> have
> > a copy of the source code at home. I'll see if I can find it and then we
> > can talk about turning it into Perl. If I can't find it, I should at
> least
> > be able to find the API calls. Are the processes that you're killing
> > regular apps, or services. (Services would be easier.)
> >
> > Chris
> >
>
> Chris,
>
> They are not services and written in the WinBatch scripting language that
> supports the creation of its own windows. They are not console windows per
> se, but similar. I have used something in Win32::GUI to locate a particular
> window by its title, but have no idea how to kill the window once it has
> been located.
>
> Dirk Bremer - Systems Programmer II - ESS/AMS - NISC St. Peters
> USA Central Time Zone
> 636-922-9158 ext. 8652 fax 636-447-4471
>
> dirk.bremer@[...].cc
> www.nisc.cc
>
> _______________________________________________
> Perl-Win32-Users mailing list
> Perl-Win32-Users@[...].com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Dirk Bremer (NISC)
Jonathan Epstein
|