Tatham Oddie

Archive for December 2006

Fixed the UAC problems with my "Vista and Office 2007 Preview Handler Pack"

leave a comment »

Being a good coder I’ve taken my laptop on holidays with me, and decided that tonight would be a good time to tackle the UAC issue with my Vista preview handlers.

The latest (and UAC friendly) version is here:

http://tatham.oddie.com.au/files/PreviewHandlerPackSetup.msi

Basically, I needed to force an escalation prompt. This task itself is pretty easy and well documented, however VS2005 (which I’m using to make my MSIs) isn’t exactly a full featured installer package – it barely knows how to copy files.

In the end I found a really useful blog post by Aaron Stebner that explains how to do just that. He solves the problem using a post-build script that fixes the MSI generated by VS2005.

Unfortunately Aaron’s solution didn’t work straight out of the box as the MSI path wasn’t being passed to the script at all. After beating my head against the wall and retyping the post-build event several times I found this little gem:

The VS2005 macro name has a typo in it!

Written by Tatham Oddie

December 22, 2006 at 22:59

Posted in Uncategorized

Released: Windows and Office Preview Handler Pack

with 72 comments

(Note: I completely rewrote this post on 18th March 2010 to bring it all up to date.)

Back with the release of Windows Vista, Microsoft introduced the concept of preview handlers. These let you preview all different file types from within Windows Explorer. Even better, they are both extensible (so you can add more types) and they work in Office too.

To make them more developer friendly, I developed a set of preview handlers for file types commonly used by developers.

Download Now

The pack works with:

  • Windows Vista
  • Windows 7
  • Outlook 2007
  • Outlook 2010

The pack adds support for:

  • ActionScript (.as)
  • ASPX (.aspx)
  • C# (.cs)
  • CSS (.css)
  • Diff (.diff, .patch)
  • DOS (.bat, .cmd)
  • JavaScript (.js)
  • Ruby (.rb, .rhtml, .rjs) thanks to Ivan Porto Carrero
  • SQL (.sql)
  • VB (.vb)

The project is basically just a stitched together set of other people’s work – there wasn’t much left for me to do considering:

If you’re interested in contributing your own ideas or adding more file types, just over to the source repository on CodePlex.

Previewing a C# (.cs) file in Vista

Previewing as ASP.NET (.aspx) file in Vista

Previewing a TSQL (.sql) file in Vista

Written by Tatham Oddie

December 20, 2006 at 18:03

Posted in Uncategorized