[python-win32] Uninstall program form Registry
wensi liu
juky.liu at gmail.com
Sat Apr 18 00:54:32 CEST 2009
Hi,
I wrote code blow for trying uninstall program form the control panel.
Somehow the code doesn't work.
def CollectChildWindows(hwnd, childWindows):
print win32gui.GetWindowText(hwnd)
#childWindows.append((hwnd, win32gui.GetWindowText(hwnd),
win32gui.getClassName(hwnd)))
if __name__ == '__main__':
import os
import win32com.client
import win32api
import win32gui
os.system('control.exe appwiz.cpl')
Currenthwnd = win32gui.FindWindow('NativeHWNDHost','Add or Remove
Programs')
childWindows = []
if Currenthwnd:
windows =
win32gui.EnumChildWindows(Currenthwnd,CollectChildWindows,childWindows)
else:
print 'NG'
It seems I can not get the child windows.
Thanks
Vince
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090417/8501e77f/attachment.htm>
More information about the python-win32
mailing list