How do I run Visual Studio as an administrator by default?
I recently discovered that even while logged into my personal laptop as an administrator, Visual Studio does not run in administrator mode and you need to explicitly use Run As Administrator.
Is there a way to make it run as an administrator by default, other than creating a shortcut, etc.?
Copied and pasted from here, the Using Advanced Properties section. This will allow you to always have the program run as an administrator when you open it.
Windows 7:
- Right click on the shortcut of the program, then click on Properties.
- Click on the Shortcut tab for a program shortcut, then click on the Advanced button.
- Check the 'Run as administrator' box, and click on OK.
- Click on OK.
- Open the program.
- If prompted by UAC, then click on Yes to apply permission to allow the program to run with full permission as an Administrator.
NOTE: If you are doing this is while logged in as standard user instead of an administrator, then you will need to provide the administrator's password before the program will run as administrator.
Update: (2015-07-05)
Windows 8, 8.1 and 10
In Windows 8, you have to right-click devenv.exe and select "Troubleshoot compatibility".
Select "Troubleshoot program"
Check "The program requires additional permissions" click "Next", click "Test the program..."
Wait for the program to launch
Click "Next"
Select "Yes, save these settings for this program"
Click "Close"
Update reference original Link
Try the following steps on Windows 10:
-
Search for Visual Studio on the Start window and select "Open file location":
-
Select "Troubleshoot compatibility" :
-
Select "troubleshoot program":
- Raise permissions:
Select "Yes, save these settings for this program"
Select "Close"
Once that is done, Visual Studio should be running as administrator.
Right click on the application, Props -> Compatibility -> Check the Run the program as administrator
Applying this change will make it so that when you double click on a .sln
file Visual Studio will not open. Also, you will not be able to drag and drop files into Visual Studio.
Follow the numbered instructions for each file in the bullited list. The paths are for a standard 64-bit install so you may have to adjust them for your system.
C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\VSLauncher.exe
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
-
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
- Right click on the file and select
Properties
- Select the
Compatibility
tab - Optional: Select
Change settings for all users
- Select
Run this program as an administrator
- Select Ok and close the dialog
- Right click on the file and select