[George Flaherty]
| 
| Is it possible with python/win32 to "query and remove" all 
| running internet explorers (ie browsers)?
| 
| I have an automation package that requires no existing 
| internet explorers to be running. So I would like to call a 
| python/win32 script to close out any ie browser windows, then 
| run the automation tools.

As far as I can see, this does what you want:
(uses the wmi module from http://timgolden.me.uk/python/wmi.html)

<code>
import wmi

c = wmi.WMI ()
for p in c.Win32_Process (Name="iexplore.exe"):
  print p.Caption
  p.Terminate ()

</code>

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to