Shell Extensions, such as Context Menu Handlers have been sought after in MSIX for quite a while. While the Microsoft MSIX Packaging Tool does not support them (today), there is plenty of evidence f...
Sander de Wit
Mar 27, 2021Brass Contributor
It is interesting to see that apps, such as Skype have implemented this successfully.
See the manifest below of the Skype app.
<com:Extension Category="windows.comServer"> <com:ComServer> <com:SurrogateServer DisplayName="Skype Share"> <com:Class Id="776dbc8d-7347-478c-8d71-791e12ef49d8" Path="Skype\SkypeContext.dll" ThreadingModel="STA" /> </com:SurrogateServer> </com:ComServer> </com:Extension> <desktop4:Extension Category="windows.fileExplorerContextMenus"> <desktop4:FileExplorerContextMenus> <desktop4:ItemType Type="*"> <desktop4:Verb Id="ContextMenu" Clsid="776dbc8d-7347-478c-8d71-791e12ef49d8" /> </desktop4:ItemType> </desktop4:FileExplorerContextMenus> </desktop4:Extension>
When looking at the Microsoft example; ExplorerCommandVerb.
It does work, but only for registered extensions and only when it is the default app.
It however uses different parts in the app manifest.
<uap3:Extension Category="windows.fileTypeAssociation">
<uap3:FileTypeAssociation Name="test" Parameters=""%1"">
<uap:SupportedFileTypes>
<uap:FileType>.test</uap:FileType>
</uap:SupportedFileTypes>
<uap2:SupportedVerbs>
<uap3:Verb Id="Edit" Parameters=""%1"">Edit in testapp</uap3:Verb>
</uap2:SupportedVerbs>
</uap3:FileTypeAssociation>
</uap3:Extension>
<com:Extension Category="windows.comServer">
<com:ComServer>
<com:SurrogateServer DisplayName="ContextMenuSample">
<com:Class Id="CC19E147-7757-483C-B27F-3D81BCEB38FE" Path="ExplorerCommandVerb.dll" ThreadingModel="STA"/>
</com:SurrogateServer>
</com:ComServer>
</com:Extension>Trying and adding the * for file extensions doesn't work.
Also adding the fileExplroerContextMenus option with a wildcard, fails to deliver succes.
<desktop4:Extension Category="windows.fileExplorerContextMenus">
<desktop4:FileExplorerContextMenus>
<desktop4:ItemType Type="*">
<desktop4:Verb Id="Command1" Clsid="CC19E147-7757-483C-B27F-3D81BCEB38FE" />
</desktop4:ItemType>
</desktop4:FileExplorerContextMenus>
</desktop4:Extension>
Looking at the Skype app and other apps, it should be possible to have a generic context menu handler. However it seems very difficult to find an example/source of working code. It would help greatly if Microsoft could share the source of SkypeContext.dll