Accessing Add/Remove Programs Details

Tim Golden tim.golden at
Thu Sep 7 11:32:47 CEST 2006


| I have to uninstall an application and  I don't find the uninstaller,
| the option available to me is to access Add/Remove Programs, 
| select the
| application and remove from there.
| I am trying to automate this task using Python:
| 1) Get the Application Name
| 2) Access the Add/Remove Program details and check if the application
| is present.
| 3) If present, then uninstall it.
| I want to understand the Python Win32 modules/calls that would helpful
| to me in this direction. Are there any?  I don't want to do it as GUI
| automation using dogtail, as I want to maintain a homogeneous 
| execution
| environment of only CLI.

Not actually tried it myself, but WMI looks like a useful
candidate here:

Bit of an example (the other way round) here:

and perhaps you need something like 
this (altho' obviously more sophisticated):
import wmi

appname = "Python 2.4.3"
c = wmi.WMI ()
for product in c.Win32_Product (Caption=appname):
  print product.Caption
  # product.Uninstall ()



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:

More information about the Python-list mailing list