Click here to Skip to main content
15,860,844 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,
my application writes a OLE compound document with summary properties.
I fail to tweak the registry so that the explorer shows these file properties.
If I rename the file to a .doc (or .xls or even .msi) extension, I see the additional properties.
But not with my own extension on Windows 7 systems.

Now I copied the same file on a Windows XP system, again without anything changed within the registry. To my (well, not sooo big) surprise, XP shows all the expected data within the properties.

XP defines the following entries within the registry:

[HKEY_CLASSES_ROOT\*\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\*\shellex\PropertySheetHandlers\CryptoSignMenu]
@="{7444C719-39BF-11D1-8CD9-00C04FC29D45}"
"SuppressionValue"=dword:00100000

[HKEY_CLASSES_ROOT\*\shellex\PropertySheetHandlers\{1F2E5C40-9550-11CE-99D2-00AA006E086C}]

[HKEY_CLASSES_ROOT\*\shellex\PropertySheetHandlers\{3EA48300-8CF6-101B-84FB-666CCB9BCD32}]
"SuppressionPolicy"=dword:00100000

[HKEY_CLASSES_ROOT\*\shellex\PropertySheetHandlers\{883373C3-BF89-11D1-BE35-080036B11A03}]
@="Summary Properties Page"
"SuppressionPolicy"=dword:00100000


The three CLSIDs are the following:

{1F2E5C40-9550-11CE-99D2-00AA006E086C} Security Shell Extension

[HKEY_CLASSES_ROOT\CLSID\{1F2E5C40-9550-11CE-99D2-00AA006E086C}]
@="Security Shell Extension"

[HKEY_CLASSES_ROOT\CLSID\{1F2E5C40-9550-11CE-99D2-00AA006E086C}\InProcServer32]
@="rshx32.dll"
"ThreadingModel"="Apartment"

{3EA48300-8CF6-101B-84FB-666CCB9BCD32} OLE Docfile Property Page
[HKEY_CLASSES_ROOT\CLSID\{3EA48300-8CF6-101B-84FB-666CCB9BCD32}]
@="OLE Docfile Property Page"

[HKEY_CLASSES_ROOT\CLSID\{3EA48300-8CF6-101B-84FB-666CCB9BCD32}\InProcServer32]
@="docprop.dll"
"ThreadingModel"="Apartment"


{883373C3-BF89-11D1-BE35-080036B11A03} Microsoft DocProp Shell Ext
[HKEY_CLASSES_ROOT\CLSID\{883373C3-BF89-11D1-BE35-080036B11A03}]
@="Microsoft DocProp Shell Ext"

[HKEY_CLASSES_ROOT\CLSID\{883373C3-BF89-11D1-BE35-080036B11A03}\InProcServer32]
@="C:\\WINDOWS\\system32\\docprop2.dll"
"ThreadingModel"="Apartment"


On a Windows 7 system, the same keys appear under:
[HKEY_CLASSES_ROOT\*\shellex\PropertySheetHandlers]
but without the SuppressionValue entries.

The CLSID {883373C3-BF89-11D1-BE35-080036B11A03} points into shell32.


Regards,

Beat
Posted
Updated 25-Mar-13 8:58am
v2

Well, this bcs of your system does not know abt your files.
You should just specify handlers for that in registry:

HKCR\{your extension} - in here you can put the information abt your extension and how it should be handled (including opening displaying in shell and so on)
Actually I think the main property which you require to add/change is ShellEx\PropertyHandler the default value is the guid of property handler (you can look at it for example for MS office files)

Note: if you specify office handler guid then property may not be displayed in case if MS Office not installed.

Information related to shell extensions: Registering Shell Extension Handlers[^]

Regards,
Maxim.
 
Share this answer
 
Comments
Beat Laemmle 25-Mar-13 15:00pm    
Maxim, thank you for your answer. The fact that it works on XP leads me to the assumption, that there is a solution without hijacking the office shell extensions.
Maxim Kartavenkov 26-Mar-13 0:54am    
What is necessary under XP is to specify property sheet guid (or guids). Under Vista+ as I remember necessary to specify provider (which will map your file properties to standard metadata values) and also property sheet guid (or guids) to show your properties via right click. Whole such information you can find in registry and articles abt shell extension should helps you figure out what properties to use.
Beat Laemmle 26-Mar-13 15:12pm    
Maxim, thank you very much for that hint.
After adding a property handler I got my properties.
With Maxim's help I figured out the necessary registry entries to see the properties of an OLE compound document.

These registry entries solved that issue:

; For ZipPackages use
; {45670FA8-ED97-4F44-BC93-305082590BFB}  Microsoft XPS Shell Metadata Handler

; For OLE Documents use
; {8d80504a-0826-40c5-97e1-ebc68f953792}  OLE DocFile Property Handler

; Create an entry for the extension of my data files
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers\.myext]
@="{8d80504a-0826-40c5-97e1-ebc68f953792}"

; Create the file extensions
[HKEY_CLASSES_ROOT\.myext]
@="MyProgram.ProgId.1"

; Create the ProgIds, but without the code!
; NOTE: ProgIds shall not have more than 39 characters!!

[HKEY_CLASSES_ROOT\MyProgram.ProgId.1]
@="My Programs data file"
"InfoTip"="prop:System.ItemType;System.Author;System.Title;System.Subject;System.Comment;System.DateModified;System.Size"
"FullDetails"="prop:System.PropGroup.Description;System.Title;System.Subject;System.Category;System.Keywords;System.Comment;System.PropGroup.Origin;System.Author;System.Document.RevisionNumber;System.Document.DateCreated;System.ApplicationName;System.PropGroup.FileSystem;System.ItemNameDisplay;System.ItemType;System.ItemFolderPathDisplay;System.DateCreated;System.DateModified;System.Size;System.FileAttributes;System.OfflineAvailability;System.OfflineStatus;System.SharedWith;System.FileOwner;System.ComputerName"

; Create the property sheet handlers
[HKEY_CLASSES_ROOT\MyProgram.ProgId.1\shellex\PropertySheetHandlers]
[HKEY_CLASSES_ROOT\MyProgram.ProgId.1\shellex\PropertySheetHandlers\{1f2e5c40-9550-11ce-99d2-00aa006e086c}]
@="Security Shell Extension"
[HKEY_CLASSES_ROOT\MyProgram.ProgId.1\shellex\PropertySheetHandlers\{3EA48300-8CF6-101B-84FB-666CCB9BCD32}]
@="OLE DocFile Property Page"
[HKEY_CLASSES_ROOT\MyProgram.ProgId.1\shellex\PropertySheetHandlers\{883373C3-BF89-11D1-BE35-080036B11A03}]
@="Summary Properties Page"


These entries bring up the properties of OLE compound documents.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900