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

John Randolph johnrandolph at gmail.com
Sat Apr 18 02:03:53 CEST 2009


On Fri, Apr 17, 2009 at 5:28 PM, Tim Golden <mail at timgolden.me.uk> 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_ on your
> newly-created object, because it (probably) doesn't
> have a Path_ -- it hasn't come off the WMI database.
> According to the example at:
>
>  http://msdn.microsoft.com/en-us/library/ms815919.aspx
>
> that's correct. But just in case it makes a difference
> you can try calling new_rule.Put_ () before you add it
> to the collection. My feeling is that it will fail but
> YMMV.

Hi, thanks for your reply.

Actually I had previously placed a delay between the new_rule creation
and calling AddMembershipRule for another reason -- to make a clear
break in the timestamps on the server side wmi logs.  Unfortunately
the delay doesn't help.

Adding a Put_ gave me a different error, "Attempt to put an instance
with no defined key."   Sensible enough error.

Not sure where to go from here, really.  I've been unable to cough up
anything interesting on the server side, and I'm not very windows or
sms savvy.

Regards,
John


>
> I'm afraid I'm not at all familiar with SMS and I'm certainly
> nowhere near an installation, so it's hard for me to test or
> reproduce the issue. Feel free to post back and I'm happy
> to diagnose at a distance or to produce debug probes in the
> WMI code itself.
>
> TJG
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>


More information about the python-win32 mailing list