how the program runs the program as an administratorrecently encountered a problem in the project run process, that is, the process of opening the program, the software will appear to open the database is a read-only database, we need to set the client to run as an administrator to resolve this problem. This can solve the problem but to the user and with the use and communication personnel inconvenience, so that the simplicity of software and ease of operation greatly discounted. so can we make the software run directly as an administrator in the process of development, and the answer is yes. Combine the information in the online inquiry and my personal understanding of the introduction. First step: Open VS2013 Right-click Project-Properties---check Enable ClickOnce security Setting (N) Step Two : The app.manifest file will be generated under the project Properties Step three : Enter the app.manifest file,<requestedexecutionlevel level= "asInvoker" uiaccess= "false"/>change to <requestedexecutionlevel level= "requireadministrator" uiaccess= "false"/> can be 。 Fourth Step:Changedon't rush to compile, we'll right-click Properties----security--Tick the check box to enable ClickOnce security settings to remove. Then compile it and you can do it. Good luck!
C # Windows permissions problem program how to run a program as an administrator