Force Visual Studio to run as Administrator on Windows 10

Source: Internet
Author: User

A safe and painful place for Windows 10 is that the behavior of UAC is changed. In the past, in Windows 7, as long as UAC was turned off and its account was the Native Admins group, any program would start as an administrator. However, on Windows 8, we can't turn off UAC, so the Metro program won't start any more.

As a code farmer for Microsoft technology, we usually have Visual Studio running under administrator privileges. Although we can select "Run as Administrator" in the right-click menu every time, superfluous's action is always painful. After some reclamation, I finally found a way to force the VS to start as an administrator.

The web-based approach solves only one problem, starting vs is actually administrator rights, but if it is opened by a shortcut to the SLn file, it is not an administrator.

The right solution should be this:

First, as with the online version, the following two steps need to be done:

    1. Opens the Properties dialog box for the VS shortcut.

2. Tick "Run as Administrator"

Now that you double-click the shortcut to VS, you can actually start with the administrator. However, in this case, still cannot start as an administrator, you must first open VS, then open solution, Egg:

The workaround is simple:

    1. Open the VS installation directory and find devenv.exe (i vs Path for C:\Program Files (x86) \microsoft Visual Studio\2017\enterprise\common7\ide\ devenv.exe), right-click and select "Compatibility Troubleshooter".

    2. Select "Troubleshooter"

    3. Select "This program requires additional permissions"

    4. After confirming the user Account Control, click Test Program, otherwise this dialog box won't let you click Next. It hurts, why don't you disable the Next button?

    5. When you click on "Test program", VS will start with administrator privileges. That's right.

6. Go back to the Compatibility Troubleshooter dialog box, click Next, then select "Yes, save these settings for this program" and you're done.

Now, whether you start vs directly or double-click SLn to start vs, it will run as administrator;

Force Visual Studio to run as Administrator on Windows 10

Related Article

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.