Vista preview handlers

by Matt 5. June 2007 17:07

Here's a right little collection of links for you. I should really put them on my list of Programs What I Run.

Anyway. Vista's got this nice preview pane that allows you to see, well, a preview of a selected file. Handy. Naturally enough, not all of your favourite file types are going to be supported out of the box, so here's a list of shell extensions to add that special magic.

Right. I feel a bullet list coming on.

But first things first. There is an MSDN article that showed how to build these extensions in managed code (which is allowed, because they run out of process. Don't run .net shell extensions in-process.) It adds a whole heap of previewers, but since it comes from a developer centric article, it's not exactly user friendly in terms of either installing or documentation. So, download the file, double click to extract it, go into the Installer directory and read the README.txt.

Now, you should have a previewer for:

  • .bin and .dat files, treated as binary files
  • .csv files displayed in a DataGridView
  • .isf files, which appear to be ink files from table pc's
  • .msi installer files displaying a list of all the files that might be installed
  • .resources files (used to hold strings and images during .net compilation)
  • .resx files (an xml based file that becomes a .resources file)
  • .snk and .keys files, again used by .net compilation to provide a strong name to an assembly.
  • .zip and .gadget. A rather lovely idea - displays a tree view of all the files in a zip based file. Gadget files are also zip files, so are also handled. You could take this further and register it as the previewer for .xpi (Firefox extensions), .jar files, and even .docx (although you might want to keep that one for the proper Word preview handler)
  • .pdf, via the Adobe Acrobat ActiveX control
  • .xaml!
  • Finally, there's an Internet Explorer preview handler. This is rather nifty and just displays the file in an IE control. It's registered for xml files (via the "xmlfile" registry key, not .xml. This means it gets anything that identifies itself as a .xml file, such as .rels). It's also registered for .config and an unknown .psq file type (which this link identifies as a "Product Studio Query File" and this link identifies "Product Studio" as a bug tracker within Microsoft). It also handles .xps files, because IE is the default xps viewer.

Now, a bunch of those preview handlers could handle other file types. The IE handler could display, oh, I don't know, html files? The MSDN article does have a sidebar on how to register other file types with existing extensions, but if that's too much of a drag, you can try this association editor.

And that's all from the same guy. What can anyone else add?

Oh, and these all work in Office 2007 on Vista, too. But not XP. Fortunately, someone has done all the dirty work of back-porting support for Office 2007 on XP. This package also includes most of the preview handlers already mentioned, but with a few more file types registered, such as .html, .htm, etc.

Tags:

Vista | Shell Extensions | Preview Handlers

Extended verbs in shell context menus

by Matt 27. October 2006 10:05

 A little while back, Tim Sneath posted a rather nice Vista tip.

Here's a trick that I don't think many people are aware of. Right-click on any folder on your Windows Vista machine while holding down the shift key. You'll see an extra context-sensitive menu item there: Open Command Prompt here. Just click on this menu and a command window will open with the current working directory set to the folder's actual location.

Now, this is a really nice thing. I've always installed the "command prompt here" power toy - now I don't have to. It's even better than the old version, too. It can automatically map a drive letter when you're browsing a UNC path, and it's available when right clicking on the background of a folder view, so you don't have to have the folder tree view visible.

And that's where you spot the bug. At least on my RC2 (5744) build, when you shift-right-click the folders in the folder tree view, it doesn't show up. This made me to wonder if it was a folder view thing. In other words, it wasn't a shell extension defined in the registry, but was a feature of the context menu in the folder view, something the tree view didn't have access to.

Fire up regedit (yes, UAC, I really meant to) and navigate to HKCR\Directory. There's a "cmd" key under both Background\shell and just shell. These both have a "command" key that specifies the cmd.exe command line to run. So, it's not a folder view thing, but a bug in the tree view. Fair enough.

The interesting part is in the "cmd" key. There's a value called "Extended". Knowing my shell extension terminology, there's a flag that gets passed through to a context menu extension called CMF_EXTENDEDVERBS. This tells the context menu to display an extended list of items - items that would normally be hidden. It's usually passed when you hold down shift. Looks like you can also specify it in the registry, too.

And this isn't just a Vista thing, either. It all works under XP, too. Handy thing to know.

Source: Tim Sneath : Windows Vista Secret #1: Open Command Prompt Here

Tags:

Vista | Shell Extensions | Context Menu Handlers

Month List

RecentComments

Comment RSS