I’ve just had to write some instructions about how to check if the Office Primary Interop Assemblies are installed – or more specifically, the Outlook ones. I thought that might be useful…
- Open Control Panel > Add and Remove Programs
- Find your Office installation. Click Change.
- Choose that you want to Add or Remove Features and click Next
- Select that you want to Choose advanced customization of application. Click Next
- Expand the Microsoft Office Outlook branch and look at the item .NET Programmability Support. A little hard disk icon means it’s installed, a red cross means it isn’t, and a hard disk with a ‘1’ means that it’s not installed, but will try to install it the first time it’s used. It should look something like this (although the yellowness is to highlight the setting):
- Click to exit without installing. To install, you’ll need the appropriate disc.
Andy, do you know of a way of determining this programmatically?
I’ve just checked by using Explorer to look at windowsassembly, it doesn’t list files as it would for a normal directory but shows
Assembly name, Version, Culture, Public Key Token, Processor Architecture
(what is an assembly Culture ?????)
I’ve built a couple of COM Add-Ins which of course load fine when the PIA’s are installed but won’t otherwise.
In that case they simply don’t load and it’s hard for anyone but the developer (and even I forget at times) that they’ve probably not been loaded because the PIA’s don’t exist. I hate how if there are any problems with loading an Add-In it silently omits it, no warnings, no logs, zip .
If I can programmatically check that PIA’s have been properly installed I can at least display a warning.
Might be able to make it a prerequisite for the installer. Though just beacuse it’s installed initially doesn’t mean it can be removed at some later time, and then have same problem.