Author Topic: Modifying File Properties as displayed in Windows Explorer  (Read 72 times)

JTaylor

  • Pundit
  • *****
  • Posts: 914
    • Data & Stuff Inc.
Modifying File Properties as displayed in Windows Explorer
« on: August 29, 2018, 10:17:11 am »
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

  • Full Member
  • ***
  • Posts: 153
Re: Modifying File Properties as displayed in Windows Explorer
« Reply #1 on: August 29, 2018, 12:07:56 pm »
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

  • Pundit
  • *****
  • Posts: 914
    • Data & Stuff Inc.
Re: Modifying File Properties as displayed in Windows Explorer
« Reply #2 on: August 29, 2018, 12:22:26 pm »
Okay.  I will try it again.   Must be missing something obvious.   Thanks.

Jim

JTaylor

  • Pundit
  • *****
  • Posts: 914
    • Data & Stuff Inc.
Re: Modifying File Properties as displayed in Windows Explorer
« Reply #3 on: August 29, 2018, 01:04:34 pm »
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

  • Tech Support
  • *****
  • Posts: 2566
    • WinBatch
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


ChuckC

  • Full Member
  • ***
  • Posts: 153
Re: Modifying File Properties as displayed in Windows Explorer
« Reply #5 on: August 30, 2018, 05:15:30 am »
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

  • Pundit
  • *****
  • Posts: 914
    • Data & Stuff Inc.
Re: Modifying File Properties as displayed in Windows Explorer
« Reply #6 on: August 30, 2018, 05:51:19 am »
I understand and you are, of course, correct...the difference in what it returns for each is huge.

Jim

ChuckC

  • Full Member
  • ***
  • Posts: 153
Re: Modifying File Properties as displayed in Windows Explorer
« Reply #7 on: August 30, 2018, 06:18:50 am »
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

  • Pundit
  • *****
  • Posts: 914
    • Data & Stuff Inc.
Re: Modifying File Properties as displayed in Windows Explorer
« Reply #8 on: August 30, 2018, 06:51:10 am »
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

  • Full Member
  • ***
  • Posts: 153
Re: Modifying File Properties as displayed in Windows Explorer
« Reply #9 on: August 30, 2018, 07:05:00 am »
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

  • Pundit
  • *****
  • Posts: 914
    • Data & Stuff Inc.
Re: Modifying File Properties as displayed in Windows Explorer
« Reply #10 on: August 30, 2018, 07:16:47 am »
Yes.  That is what I have been doing.

Jim