Re: [python-win32] win32gui.GetMenu() return 0

2009-04-17 Thread wensi liu
Thanks for your kindly explanation. In fact I am focus on Automation Testing for our product around IE. So I need access IE by menu, toolbar, even split button for to simulate all user's action which may affect our product. I just looking for a way to deal with that. Thanks again. On Thu,

Re: [python-win32] win32gui.GetMenu() return 0

2009-04-17 Thread Tim Roberts
wensi liu wrote: > > In fact I am focus on Automation Testing for our product around IE. > > So I need access IE by menu, toolbar, even split button for to > simulate all user's action which may affect our product. > > I just looking for a way to deal with that. Oh, you should have said that! I s

[python-win32] AddMembershipRule(SMS_CollectionRuleDirect): Generic failure

2009-04-17 Thread John Randolph
Hi list: I've been beating my head against this problem for 2 days and can't figure it out. Searching the archives produced a semi-relevant thread from the past but the former fixes haven't worked for me. Using wmi 1.3.2, I've got the following simple code: system = wmih.SMS_R_System(Netbio

[python-win32] Restarting Python interpreter used by Classic ASP?

2009-04-17 Thread Jason Baker
I've got some Python code that needs to interact with some Classic ASP code. So I've got some Python Classic ASP files that import other Python modules. What I would like to do is find a way to restart the Python interpreter so that I can force it to reload all loaded modules. However, I don't r

Re: [python-win32] AddMembershipRule(SMS_CollectionRuleDirect): Generic failure

2009-04-17 Thread John Randolph
On Fri, Apr 17, 2009 at 4:59 PM, John Randolph wrote: snip > wmi.x_wmi: -0x7ffdfff7 - Exception occurred. >  Error in: SWbemObjectEx >  -0x7ffbefff - Generic failure > (er, message got cut off) anyway, enabling verbose WMI logging didn't produce anything revealing. anyone have any tips? Regards

Re: [python-win32] AddMembershipRule(SMS_CollectionRuleDirect): Generic failure

2009-04-17 Thread Tim Golden
John Randolph wrote: Hi list: I've been beating my head against this problem for 2 days and can't figure it out. Searching the archives produced a semi-relevant thread from the past but the former fixes haven't worked for me. Using wmi 1.3.2, I've got the following simple code: system = w

[python-win32] Uninstall program form Registry

2009-04-17 Thread wensi liu
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__

Re: [python-win32] Uninstall program form Registry

2009-04-17 Thread Tim Roberts
wensi liu wrote: > > I wrote code blow for trying uninstall program form the control panel. > Somehow the code doesn't work. Right. This is doomed to failure, for reasons very similar to your IE troubles. The Add/Remove Programs control panel does not use child windows to host its controls. Alm

Re: [python-win32] Uninstall program form Registry

2009-04-17 Thread wensi liu
I am using AccExplorer to identify the Name and Class Name. Actually, I did uninstall program via Registry, however, the behavior could be a little difference between them, like: If I uninstall program from Registry, the program won't delete it's folder itself. That the reason why I am trying to

Re: [python-win32] Uninstall program form Registry

2009-04-17 Thread Tim Roberts
wensi liu wrote: > I am using AccExplorer to identify the Name and Class Name. > > Actually, I did uninstall program via Registry, however, the behavior > could be a little difference between them, like: > > If I uninstall program from Registry, the program won't delete it's > folder itself. That

Re: [python-win32] AddMembershipRule(SMS_CollectionRuleDirect): Generic failure

2009-04-17 Thread John Randolph
On Fri, Apr 17, 2009 at 5:28 PM, Tim Golden wrote: > > The first suggests a delay might help. The second doesn't come to > any conclusion except that if the last poster got it working then > it's something a bit environmental. Try the delay, perhaps. > FWIW, the WMI code probably isn't calling Put

Re: [python-win32] Uninstall program form Registry

2009-04-17 Thread wensi liu
I implemented a test case for verifying functionality of our program, one of the feature is some folders would be deleted after uninstall. Somehow, those folder still exist after I uninstall via Registry like your mentioned. Instead, the folder would be deleted as expected when I uninstall it manu