I'm writing a replacement to the windows event viewer, and as such, I require my program to start with admin privileges by default. Yes, I could run it without admin privileges and then have it elevate as required, but that could get very annoying very fast as the security log requires admin privileges to start with. How can I make the program assume admin privileges when I start it, and request access through UAC?
If possible, I'd like to also make this an optional function for those admins who are OK with the constant UAC nagging. Is there a simple way I can set an option in the program's interface to specify whether or not the program should default to admin access, or just use it as needed?