How to Run Visual Studio.NET Automatically as an Administrator

Setup Microsoft Visual Studio to automatically run in Administrator mode.
by Updated July 16, 2010

When developing websites or applications in Visual Studio.NET, you sometimes need to have Visual Studio run as an administrator.  For instance, if you are developing a Web Application Project that uses IIS7 as the local development server for testing, chances are you need to run Visual Studio 2010 as an administrator to access the Solution/ Project files in Visual Studio. While you can manually select Visual Studio to "Run as administrator" everytime you start the program, this can become a bit of a hassle after a while. 

Instead, it's much easier just to change the Privilege Level for Microsoft Visual Studio to automatically start up and run as an administrator.  Here's how to do this when using a Windows Vista computer:

  1. Click the 'Start' button.
  2. Click 'All Programs'
  3. In the menu, locate and click on the folder that says 'Microsoft Visual Studio 2010' (your version might be 2005, or 2008).
  4. Now right-click on the 'Microsoft Visual Studio 2010' program file, which will bring up the 'Properties' pop-up box.
  5. Select the 'Compatibility' tab, and then in the Privilege Level section, check the box next to "Run this program as an administrator"
  6. Click the 'Apply' button, then click the 'OK' button.
  7. Now each time you open Microsoft Visual Studio 2010, it will be running in (Administrator) mode.

UPDATE 7/15/2010:  I actually switched to a newer and better method for running Visual Studio 2010 (or 2008) as an Administrator, which allows me to open files individually without getting VS2010 errors in Windows 7 when Visual Studio is running as an Admin.  To see this new and improved method check out: How To Fix "There was a problem sending the command to the program." in Visual Studio

 


0
0

Add your comment

by Anonymous - Already have an account? Login now!
Your Name:

Comment:
Enter the text you see in the image below
What do you see?
Can't read the image? View a new one.
Your comment will appear after being approved.

Related Posts


Recently, I decided to begin converting my Visual Studio.net Web Site Projects (WSP) to Web Application Projects (WAP) to take advantage of some of the new Web Deployment features in Visual Studio.net 2010 (see Vishal Joshi's blog for a run through of WSP...  more »

The default settings in Visual Studio 2010 Professional do not automatically show the Solution file by default in the Solution Explorer sidebar. This can be a bit of a problem if you are trying to add another project to your existing solution. To get the...  more »

While using my new Windows 7 64-bit computer, with Visual Studio 2010 running as Administrator, I began getting the following error while trying to open up individual c# files or asp.net files in VS2010: "There was a problem sending the command to the...  more »

So yesterday, I started getting green squiggly line validation warnings at design time on ASP.NET server controls within the HTML Design view for my Visual Web Developer 2010 Express project in Windows 7. Essentially, intellisense on all the ASP.NET...  more »

To display line numbers in a Visual Studio.net 2008 code window do the following: Open Visual Studio.net On the Menu bar, Select 'Tools' -> 'Options' In the Options pop-up window, Select 'Text Editor' -> 'All Languages' > 'General'. Note: If you...  more »