I am admin on my local machine. However the app I am creating (an outlook VSTO addin) will be deployed by a deployment admin to users who won't have admin.
The app installs correctly.
My issue is that I have code which checks if an EventLog.SourceExists("my VSTO addin")
. If not it will EventLog.CreateEventSource("my VSTO addin")
.
My questions:
- Do I really need to create an event source? Will it still log without the source existing?
- How should I create the event source (if #1 is required)?
2a Perhaps I need to create a small app which creates the event source and this needs to be installed by an admin?
2b Perhaps I can put it in the code somewhere which will invoke when its being installed? (I'm using install shield)
2c Perhaps it can be done by an admin as part of group policy?
2d I can create a registry key as per https://learn.microsoft.com/en-us/windows/desktop/EventLog/event-sources