Method 1:
RegistryHKEY_CURRENT_USER \ Software \ Microsoft \ Windows NT \ CurrentVersion \ appcompatflags \ Layers
Create a new string value with the name setProgramPATH (without quotation marks), the data is "runasadmin ",
Method 2:
In Windows 8, VS is started as an administrator by default.
1、positioning to vsprogram file (devenv.exe ):
This file is generally on the: installation disk: \ Program Files \ Microsoft Visual Studio 10.0 \ common7 \ ide;
You can also right-click the process name of Vs in the task manager and click the file location to find the path of.
Location to vsprogram file (devenv.exe)
2. Right-click devenv.exe and select compatibility FAQs.
Right-click devenv.exe and select compatibility FAQs.
3. Select the "Troubleshooting Program (button)" option --> next
Click the troubleshooting Program
4. Select the "this program requires additional permissions" check box --> next
Select the check box that requires additional permissions for this program
5. Click the "test program" button --> next: After you click it, the system will enable vs as an administrator. If you do not close it, it will be okay.
Click Test Program
6. Click "Yes, save these settings for the program" --> next
Click Yes to save these settings for the program
7. Last, close the program compatibility troubleshooting dialog box. Now, open vs to check whether the above title contains (Administrator). If yes, congratulations on your success