How to Run Visual Studio Permanently as Administrator

On one device I run constantly into problems with Visual Studio because my user does not have all the rights necessary to perform the tasks I have to do. The simple work around for this problem is to run Visual Studio as an administrator. While I can start Visual Studio explicit as administrator every time I open a project, but that extra step gets annoying quickly.

To permanently run Visual Studio as an administrator in Windows 10 you can follow these steps:

  1. Go to your Visual Studio installation folder (something like “C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\”)
  2. Right-click on devenv.exe and select “Troubleshoot compatibility“:
    In the context menu of devenv.exe select 'Troubleshoot compatibility'
  3. Select “Troubleshoot program
    Select the second option
  4. Check “The program requires additional permissions”:
    Permissions is the third checkbox from the top
  5. Click “Next
  6. Click “Test the program…
    Do not forget to test the change!
  7. Wait for Visual Studio to start – the User Account Control may ask you to approve this change
  8. Click “Next
  9. Select “Yes, save these settings for this program” and wait until it finishes:
    Select the Yes option
  10. Click “Close“:
    Close to finish the change

From now on Visual Studio opens as administrator all the time – at least until you update Visual Studio. Depending on what changes with the update, you need to repeat this sequence to keep running Visual Studio as administrator.

You now should see the ADMIN badge all the time

6 thoughts on “How to Run Visual Studio Permanently as Administrator”

  1. Ohh man! Thank you very much. I was looking a way to do this, but everyone suggests the shortcut thing, that in some, and I think many cases, it won’t work. Thank you veryyyy much!

    Reply
  2. I did this which was great until I found that I was getting weird behaviours when trying to build a application that integrates with Outlook. In a nutshell my code runs fine in the debugger if Outlook is not running but fails if Outlook is running. We now suspect it’s because Visual Studio is running with Admin rights. So I want to now undo this change but can’t work out how to do that; any suggestions?

    Reply
  3. I have since been advised that one can simply re-run the troubleshooting steps above and uncheck the option in step 4, and I’m pleased to report that it worked for me.

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.