Some projects that run directly with VS open always require elevated privileges, such as 1. The first step (the only way to do this is to run vs before you open the project so that it runs as an administrator. However, if you opened it by using a shortcut to the SLn file, it is not an administrator. ) (1) on the desktop, right-click the vs2010 icon, select the Shortcut tab, then select Advanced (2) tick Run as Administrator (R), then click OK (3) and click OK and apply 2. Step Two (such a way to click on the project's solution is to run directly as an administrator) (1) Win+r, enter regedit, click OK, open the Registry (2) in the registry "HKEY_CURRENT_USER\Software\Microsoft\Windows Nt\currentversion\ Appcompatflags\layers ", new string:" C:\Program Files (x86) \microsoft Visual Studio 10.0\common7\ide\devenv.exe ", value" ~ RUNASADMIN ". Enable devenv.exe to gain administrator privileges.(3)Note: "C:\Program Files (x86) \microsoft Visual Studio 10.0\common7\ide\devenv.exe" is the value of the target (T) in the right-click Desktop vs Icon, attribute.
Win10 settings vs2010 always run as Administrator