[python-win32] How to set value with PyIPropertyStore

Peng Chen capaneus at gmail.com
Mon Oct 14 18:27:34 EDT 2019


Hi,
I'm working on a script to shift video media creation time.
I used:
properties = propsys.SHGetPropertyStoreFromParsingName(file_name)
mDate = properties.GetValue(pscon.PKEY_Media_DateEncoded).GetValue()
and successfully retrieved media encoded date property.
Now I could shift the time and write this value back.

I can see there is a function
PyIPropertyStore.SetValue(key, value) and PyIPropertyStore.Commit()
to write the date back, but I'm not sure how to construct the value because
it requires PyPROPVARIANT type.
I can't figure out any where to import this type and doesn't know how to
construct it.

Sorry I'm not familiar with windows programming, would you please help me
on this?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20191014/a3e017d0/attachment.html>


More information about the python-win32 mailing list