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:
- Go to your Visual Studio installation folder (something like “C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\”)
- Right-click on devenv.exe and select “Troubleshoot compatibility“:
- Select “Troubleshoot program”
- Check “The program requires additional permissions”:
- Click “Next“
- Click “Test the program…”
- Wait for Visual Studio to start – the User Account Control may ask you to approve this change
- Click “Next“
- Select “Yes, save these settings for this program” and wait until it finishes:
- Click “Close“:
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.
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!
Clear instructions, easy to follow – thank you
These settings are a real time-saver
This was really easy to follow. Thanks.
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?
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.
Hi Alec,
I am glad it worked. Thanks for letting me know.
Regards,
Johnny