![visual studio extensions run as admin visual studio extensions run as admin](https://i.stack.imgur.com/QXfYp.png)
Here is the command line to put in the shortcut:Ĭ:\Windows\System32\schtasks.exe /run /tn "" Right-click where you want the shortcut and select Create Shortcut. If it works great then create a shortcut to the task somewhere. OK, now you can test this by right-clicking on the task and running it.
#VISUAL STUDIO EXTENSIONS RUN AS ADMIN INSTALL#
Install the free VSCommands extension for Visual Studio (it's in the Visual Studio Extensions Gallery) and then configure it to always have Visual Studio start with admin privileges by going to Tools -> VSCommands -> Options -> IDE Enhancements -> General and check off Always start Visual Studio with elevated permissions and click the Save button. These file are located at: Visual Studio 2010Ĭ:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe Visual Studio 2012Ĭ:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe Visual Studio 2013Ĭ:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe Visual Studio 2015Ĭ:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe Visual Studio 2019Ĭ:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe Option 2 - Use VSCommands extension for Visual Studio To have Visual Studio always run as an admin when just opening visual studio directly, do the same thing to the DevEnv.exe file(s). Click Next, then hit Yes, save these settings for this program, and then the close buton.Check off The program requires additional permissions and hit Next.Right-click on VSLauncher.exe and choose Troubleshoot compatibility.
![visual studio extensions run as admin visual studio extensions run as admin](https://blogs.sap.com/wp-content/uploads/2019/11/install_sonarlint.jpg)
Navigate to C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe.To have Visual Studio always run as admin when opening any. Option 1 - Set VSLauncher.exe and DevEnv.exe to always run as admin
![visual studio extensions run as admin visual studio extensions run as admin](https://blog.mastykarz.nl/assets/images/YouinstalledaVisualStudioextensionanditd_914A/optionsDialog.png)
The issues I reported above are now gone as well. Once restarted you'll be back to everything running with admin permissions if you're an admin.
#VISUAL STUDIO EXTENSIONS RUN AS ADMIN WINDOWS#
The key to edit is: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\SystemĪfter changing this Windows will prompt you to restart. This left me having to use the open file dialog if I wanted to open any non solution/project file.ĭespite there being no UI to turn off UAC like in the past, that I saw at least, you can still do so through the registry. Visual Studio would open but then I'd get an error saying There was a problem sending the command to the program. Then after I used VSCommands to always run Visual Studio with elevated permissions I was no longer able to open files associated with Visual Studio, aside from solution files, by double clicking them in Explorer. When running VS2012 with elevated permissions I was no longer able to drag & drop files into it from Explorer which I assume is because Explorer isn't running with elevated permissions. I started running into some issues right away though. I posted about this on Stack Overflow before finding this question and then tried everything the other answers here suggested.