I am trying to write a C# application that needs to run on multiple server OS, including 2008. My application stores information in the registry (for now) and needs to write to both local drives (on the server) and remote shares. Text files are used to write
logs on the server, but I also need to record events in the event log.
The application works fine on 2003, but when I run it on 2008, I am facing issues.
It's able to read/write to the registry on 2003 & 2008. It can even write to text files (as long as its not the root of the C drive) without any elevated privileges.
When it comes to event logs, the program can easily write to application log on 2003, but on 2008, security exception is thrown. I know this is because it parses through the securtiy log as well, which creates the problem. I can live with not being able
to write to the event log, though I would appreciate it if some one could tell me how to do it on 2008 as well.
Now to my question: Can I run my Winforms application on 2003 or 2008, automatically giving it elevated permissions (full admin rights) with out having to use the UAC prompt or an Administrator Command Prompt window. The application needs to run without
any user interaction, part of the requirements.
If someone could help me, I would really appreciate that.
View Complete Post