tags:

views:

12

answers:

1

I wish to execute a URL in the format
mapi://{S-1-5-21-1626573300-1364474481-487586288-1001}/[email protected]($b423dcd5)/0/Inbox/가가가가곕갘객겒갨겑곓걌게겻겨곹곒갓곅갩갤가갠가 , which I got from searching via Windows Desktop Search.

On Vista with Outlook 2007, this fails to open Emails if outlook is already open. Except sometimes, when it works for mysterious reasons.


Below are some things I've tried in an attempt to get this to work:

Executing it with Process.Start, or executing it with Process.Start via cmd.exe /c start. The former froze for a minute, then did nothing, with Process.Start returning null (except when Outlook was not already open, when it worked). The latter popped up an "Unspecified Error" message box.

http://stackoverflow.com/questions/2400223/open-mails-in-outlook-from-java-using-the-protocol-mapi
I couldn't figure out how to get this script to work. The vbs scripts I generated claimed to have found invalid characters. Also, this solution makes me sad.

http://social.msdn.microsoft.com/forums/en-US/windowsdesktopsearchdevelopment/thread/00491710-e245-452f-8b0a-56caa56277e4/ I suspect this solution will work. However, I couldn't get it working in C++ or C# due to compiler errors. This is a matter of not being sure which libraries to include or in C# how to effectively use ShellItem2 etc. with interop.

http://stackoverflow.com/questions/234231/how-do-you-create-an-application-shortcut-lnk-file-in-c-or-net I tried creating a shortcut and calling Process.Start on that. This also did not work, though the shortcut itself worked when I double-clicked on it.

A: 

Turns out the issue was a UAC issue. I tend to run VS as admin, since some apps need it.

Brian