I am trying to write my software so that it has administrator rights. Because it has to create files and be able to delete them, But if it is not started by right clicking on it, and clicking on run as administrator it is blocked from doing so.
Any solution would be great.
I did manage to find the following pages. But cannot make sense of it:
- Run application with admin rights
- How to give Administrator Rights to code?
- Run Code as a different user (C#)
Update
I'm trying to read files from the program files directory, and write them elsewhere.