There are a number of ways suggested on various forums for checking whether or not Outlook is installed, and which version if it is. You may have some code that needs to act differently based on whether Outlook 2007 or 2010 is installed.

Many of the ways suggested are hacks at best, and certainly not resilient. I’m not automatically convinced that the most commonly suggested methods would yield consistent results across all localizations and organizations. This article discusses how to check whether Outlook 2007 or 2010 using a more foolproof method.

A less hackish way of determining which version is installed is to make use of the MSI API. This would add some overhead in comparison to simply reading a registry key, of course; however, whenever I’m faced with a situation where I need to make decisions based on a product’s installation state, I tend to gravitate towards using the API for the system that oversees those sorts of things.

If you make use of the MSI API, the most sensible thing to look for would probably be the Outlook core component (OUTLOOK.EXE) itself. This component is not localized, so the component GUID will be the same across every language Office comes in.

Because you won’t know the Product Code easily, you can simply check the component’s installation state by using MsiLocateComponent. The only thing you’ll need in order to use this function is the actual component you’re looking for.

Here’s some component codes I’ve compiled for Outlook’s core component:

Outlook 2007{0638C49D-BB8B-4CD1-B191-055E8F325736}

Outlook 2010 32-bit{CFF13DD8-6EF2-49EB-B265-E3BFC6501C1D}

Outlook 2010 64-bit{ECCC8A38-7855-46CA-88FB-3BAA7CD95E56}

Matt Weber

I'm the the Senior Software Architect at Emergingsoft where I lead the software development team. I am also the owner of this website. I enjoy well-designed code, independent thought, and the application of rationality in general. You can reach me at matt@badecho.com.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
   
© 2012-2013 Matt Weber. All Rights Reserved. Terms of Use.