Win10下
設置軟件默認爲管理員權限打開
Win+R regedit 找到路徑如下
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
在 Layers下創建一個字符串值,名字填VS路徑
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe
添加完成後雙擊編輯 數值數據塊填寫如下
~ RUNASADMIN
保存,啓動VS 發現已經是管理員權限