C # Windows permissions problem program how to run a program as an administrator

Source: Internet
Author: User

                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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.