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(NetbiosName=hostname) new_rule = wmih.SMS_CollectionRuleDirect.new() new_rule.ResourceID = system[0].ResourceID new_rule.RuleName = '%s (%d)' % (hostname, system[0].ResourceID) new_rule.ResourceClassName = 'SMS_R_System' query_id, rv = c.AddMembershipRule(new_rule) I've also tried getting the method InParameters, populating them and calling the method directly as previous list traffic experimented with. However, neither method allows me to add the rule. The code above produces the following exception: File "remotewmi.py", line 115, in PolicyInstall query_id, rv = c.AddMembershipRule(new_rule) File "C:\Documents and Settings\jrand\wmi.py", line 396, in __call__ handle_com_error (error_info) File "C:\Documents and Settings\jrand\wmi.py", line 189, in handle_com_error raise x_wmi, "\n".join (exception_string) wmi.x_wmi: -0x7ffdfff7 - Exception occurred. Error in: SWbemObjectEx -0x7ffbefff - Generic failure _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32