[python-win32] BCD WMI modification via pywin32 without effect

Tim Golden mail at timgolden.me.uk
Fri Jun 15 14:54:39 CEST 2012


On 15/06/2012 08:53, Radek Holý wrote:
> Hello,
> 
> I’m trying to edit the BCD (Boot Configuration Data) using WMI in Python:

Hmmm. I'd love to help you, but I'd need to set up a VM first so I don't
screw up my Boot Configuration along the way!

I notice one small line in the docs for BcdIntegerElement:


http://msdn.microsoft.com/en-us/library/windows/desktop/aa362650%28v=vs.85%29.aspx

which states:

"""
The value is passed as a string because Automation does not natively
support 64-bit integers
"""

Frankly if that *were* the issue, I'd expect the Set... call to fail
in the presence of integer but it's the only thing I can spot quickly.

BTW my wmi module does some of the heavy lifting, but it would need some
help here as the methods you're using are (unusually) returning further
WMI objects. I don't think it'll help the issue you're experiencing but
it might be worth a glance:

  http://timgolden.me.uk/python/wmi/index.html

TJG


More information about the python-win32 mailing list