I am developing a C # application (WinForms) that uses PIA Office 2007 to integrate with Outlook 2007. In my dev environment, UAC is disabled and all my features work, but my test environment is a 32-bit version of Vista with UAC enabled.
In a test environment, Outlook runs by default at the default integrity level (when started by the user). My application requires a high level of integrity (i.e., it presents a UAC prompt at startup). In this case, creating an instance of the class Microsoft.Office.Interop.Outlook.Applicationfrom my application completes using CO_E_SERVER_EXEC_FAILURE( COMException, HRESULT = 0x80080005).
I can work around this problem in two ways:
- Make sure that Outlook is not running when my application instantiates
Application- this makes Outlook work in high integrity mode, since the process that launches it also works with a high degree of integrity. - Indicates that Outlook always starts as an administrator (Compatibility tab).
It is worth noting that PIA Word and Excel do not exhibit this problem.
Is there any way to solve this problem? My application cannot work with a low degree of integrity, but there is a possibility that it can be adapted to work at a medium integrity level - however, I cannot figure out how to do this. Can .NET executables work even in this mode?
Outlook ? , Word Excel, , .