I have an Outlook add-in developed with VSTO 2010 that I want to write in the event log. During debugging, I can get this to work just by doing the following:
if (!EventLog.SourceExists(ADDIN_FRIENDLY_NAME)) { EventLog.CreateEventSource(ADDIN_FRIENDLY_NAME, null); } EventLog.WriteEntry(ADDIN_FRIENDLY_NAME, message, EventLogEntryType.Warning);
The problem is the release of the version, the add-in does not have administrator rights to read the log. I found some articles that talked about creating an EventLog source during installation, but I'm using ClickOnce, and there seems to be no way to do this. In addition, someone talked about creating a separate DLL, and then calls InstallUtil in that DLL to create the source. This does not work for me, as it still requires administrator rights.
Can I run an add-in using the Outlook security level? I see Outlook messages in the event log, so it should have sufficient rights for this.
user1715925
source share