I promised before that I would take an in depth look at Click-to-Run and MFCMAPI. I’ve done so and the results are mixed. I couldn’t find a way to launch MFCMAPI on its own into the virtual environment, but I did find a trick to load it along side Outlook.
Click-to-Run, described here is a mechanism for delivering Office to client machines. It’s built on top of App-V (formerly SoftGrid). Using Click-to-Run, you can stream Office to a client machine (so that you can run it while it’s still installing) and it also runs virtually, reducing the number of co-existence scenarios. Enterprises can use this to reduce installation, support, and upgrade costs. We even use it to deliver trial versions of Office 2010.
The virtualization behind Click-to-Run is the source of the problem we have with MAPI. Since MAPI is installed by Outlook, and since Outlook is virtualized, applications running outside the Click-to-Run don’t have access to MAPI. We describe what does and doesn’t work here:
MFCMAPI falls in the “doesn’t work” category, but that doesn’t mean there aren’t tricks you can use. In the previous post, Kevin noted that he could use an Outlook 2010 Add-in to launch MFCMAPI inside the virtual environment. This will work, but I found another trick: use a little known feature of the File/Open dialog.
Here’s the trick as I perform it:
- Open Outlook Data File - File/Open/Open Outlook Data File
- Navigate to c:windowssystem32
- Select "All Files" from the file type dropdown.
- Locate cmd.exe, right click, and select Open.
- The command prompt is now running in the virtual environment. Cancel Outlook Data File dialog.
- Run MFCMAPI from the command prompt.
The advantage of doing the trick this way is you don’t have to install anything special to make it work. Also, once you have the command prompt open, you can run any application you want from inside the virtual environment, not just MFCMAPI.
- This trick obviously only works if Outlook is running. If you’re having trouble getting Outlook to log on and you wanted to use MFCMAPI to look at the profile, you may be out of luck. Of course, you could always try building a new profile using the Mail Control Panel and using that profile to get in to Outlook, and then do your troubleshooting.
- If you close Outlook, I think your command prompt and anything launched from it will also be closed. If you have multiple virtual Office application installed, you might try doing the trick from one of the other Office applications and leaving it open, allowing you to open and close Outlook.
- If you have a policy applied which doesn’t allow you to create PSTs, you can’t use that entry point into the File/Open dialog. You might try using Attach File from a mail message instead.
- The ideal fix here would be to add MFCMAPI (or whatever MAPI based application you need to run) to the virtual environment. This involves a lot of stuff about App-V that I just don’t understand. Until someone shows me it can be done, I’ve concluded it’s impossible. 🙂
If I haven’t been clear – this is a trick to getting MFCMAPI to run in this environment. It’s not supported and not guaranteed to work. Use at your own risk.