One of the things we’ve seen with Outlook 2013 is that Wrapped PSTs that never used to be indexed by Outlook are indexed now. This can be great if you’ve got a store which can deal with being crawled, but what if your store can’t handle it? The PST provider on which the Wrapped PST is based controls if and when it is indexed. Part of the logic it uses is to call in to the Crawl Scope Manager (CSM) interface to determine if the store has been excluded. Namely, it calls IncludedInCrawlScope, passing in a URL which represents the PST. The CSM will then report whether or not the PST is eligible for indexing.
If you don’t want your store indexed, then the trick is to make sure the CSM returns false here. You can do this by calling AddUserScopeRule and passing the appropriate URL. Here’s the format for the URL:
As you may note, this URL format is very similar to the one described here:
There are a few key differences and caveats:
Here’s an example URL you might generate:
Another issue to be aware of is when you add your URL to the CSM. The PST provider is very sensitive to the indexing state changing while the PST is open. If the state changes, the PST may end up kicking off an installer to repair Outlook. So you need to add the URL before the PST knows anything about it. The best time to do this is when your provider is first loaded, during the IMSProvider::Logon, before you call Logon in the PST. At this point, you have enough information to construct the URL and call in to the CSM, but the PST provider is not aware yet that this PST is being opened.
[Update - 1/16/13] Having registered your store for exclusion, you may want to check that it is, in fact, excluded. If you look at the Indexing Options, you'll see an interesting listing: Microsoft Outlook is both under "Included Locations" and "Exclude". Don't worry - this doesn't mean all of Outlook isn't being indexed. The shell extension that Outlook has registered for the mapi15 namespace simply returns "Microsoft Outlook" as the user readable name for any URL which has been excluded. Development did look at augmenting the extension to provide a better string, but decided most users would never look at this UI to begin with, so it wasn't worth the risk. If you want to check that your code ran correctly, you can look at the registration in the registry under this key:
The December 2013 Release (build 184.108.40.2060) is live: http://mfcmapi.codeplex.com.
It’s been a while. I’ve been busy while I was gone. All dialogs got a visual refresh with collapsible panes. New windows cascade now. I finally implemented a viewer for messages. And most important of all, I went out and got myself a snazzy new icon for Christmas:
Here's a change list - see the Issue Tracker on Codeplex for more details, or look at the code: