Modifying File Properties as displayed in Windows Explorer

Started by JTaylor, August 29, 2018, 10:17:11 AM

Previous topic - Next topic

JTaylor

I am sure this has been asked before but can't find an answer...Is there a way to programatically alter the data found in Windows Explorer Detail view?   I have looked at the Property Store Extender but that doesn't appear to be the same thing or maybe I am just reading things wrong.     Have looked at the DSO option but that has the same problem.   At least changes I make that route do not display in Windows Explorer.

Obviously may just be me but some confirmation and/or suggestions one way or the other would be helpful.

Thanks.

Jim

ChuckC

If you are right-clicking on a file or folder in the Windows Explorer, clicking on "Properties" in the pop-up menu and then navigating to the "Details" panel on the Properties Page, then the Property Store extender is exactly what you're looking for.  Install it and run the PS Explorer sample script for a demonstration of the extender's capabilities.  It is using COM interfaces that Microsoft provides to interface with all of the property handler extensions that have been installed on any given Windows system.

JTaylor

Okay.  I will try it again.   Must be missing something obvious.   Thanks.

Jim

JTaylor

I figured it out.   The example was leading me astray.   When you open it for Read/Write it was only listing certain attributes making me think one couldn't change any others but if you ignore that detail and just make the change to those not in the list it seems to work.

Thanks again.

Jim

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

ChuckC

The list of property names that gets displayed is not something that the PS Explorer script arbitrarily cooks up on its own.  They are obtained from the underling COM interfaces that Microsoft provides for access the Property Store functionality.  It may well be that it returns different property names based on whether the handle to the file in question has read-only or read/write access.

Feel free to hack away at it and see what you can do with it.  The Windows Explorer is using the exact same COM interfaces on the "Details" panel of the "Properties" page, so whatever you can do in the Windows Explorer in terms of accessing properties and modifying them should also be doable with the extender.

JTaylor

I understand and you are, of course, correct...the difference in what it returns for each is huge.

Jim

ChuckC

Yes, I was thinking of certain properties that are displayed for convenience purposes, but which wouldn't be modifiable.  For example, the details for any kind of EXE or DLL file will show you details from the version information resources, such as the file description, file version, product name, product version, copyright, etc..., yet those won't be modifiable via the Windows Explorer.  For the most part, modifiable properties will most likely be present on various types of [office] documents, PDF files, various media files [MP3, other audio & video types], etc...

Others, like file size and the various timestamp values can be modified via API calls related to the file system, but won't be modifiable via the properties view on the "Details" panel.

JTaylor

Yes....but what I have discovered is that it doesn't list properties in the Write list but which are still writable.  That is the part to which I previously referred.

Jim

ChuckC

Ah, OK.  It is most likely the underlying Property Store system within Windows is not returning the complete list.  The extender simply makes a call to a method on a COM interface and gives back the list of property names that are supported for read-only or read/write based on the gps-flags value that was passed in to the psuOpenPS() function.

The best thing you can do is to take the complete list of property names that is returned for both read-only and read/write modes and then, with a PS Index value obtained with the read/write gps-flags value, make attempts at modifying all of them and see which ones you get success for and which ones you get failures for.  There may be some pattern to it, or it might be completely random.  Microsoft incorporates updates to the Property Store Handler plug-ins DLLs that they supply as part of normal updates via Windows patches.  Otherwise, 3rd party vendors may have their own plug-ins installed, too, that extend support to properties for their own product-specific files and their associated properties.

JTaylor