Thursday, June 30, 2016

Visual Studio/Windows 10: Running Visual Studio (or any Application) as Administrator on Windows 10 every time the Application is invoked

On certain projects Visual Studio needs to be run with Administrative privileges. As of Windows 10 it is possible automatically run Visual Studio or any application for that matter with administrative privileges.

Pre-Windows 10 Running as Administrator

The old way (pre-Windows 10) of doing things mean explicitly invoking administrative privileges each time an application was. The legacy way for Visual Studio or any application to run in Administrative mode was by right clicking on the icon used to launch the application. For Visual Studio pinned to the task bar, right clicking on the Visual Studio icon appears as follows:



From the previous context menu click on Visual Studio 2015 and and a context submenu appears:


From the sub-context menu it is possible to run Visual Studio as an administrator by selecting "Run as administrator." This is a tedious process especially if an application like Visual Studio is launched multiple times a day.

Windows 10 Era Running as Administrator

To automatically run Visual Studio as an Administrator, right click on the icon used to launch Visual Studio:



Right click on Visual Studio 2015 from the menu which displays the following sub-context menu:



From the sub-context menu click on the Properties menu item. This menu item displays the properties for the Visual Studio shortcut:


Select the Shortcut tab from the Properties dialog and then click on the Advanced button. This displays the Advanced Properties dialog (see below):


From the Advanced Properties dialog check "Run as administrator" and the click on OK. From the Properties dialog click on OK or Apply to insure the application will always run with Administrative privileges in the future.

After this is configured, Visual Studio will run as follows each time its shortcut icon is used to launch the application:


Notice in the previous screenshot that the title of Visual Studio is "Start Page - Microsoft Visual Studio (Administrator)" indicating it is running with Administrative privileges.

No comments :

Post a Comment