The Computer Oracle

Always start Visual Studio as an Administrator on Windows 8

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Take control of your privacy with Proton's trusted, Swiss-based, secure services.
Choose what you need and safeguard your digital life:
Mail: https://go.getproton.me/SH1CU
VPN: https://go.getproton.me/SH1DI
Password Manager: https://go.getproton.me/SH1DJ
Drive: https://go.getproton.me/SH1CT


Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Meditation

--

Chapters
00:00 Always Start Visual Studio As An Administrator On Windows 8
00:26 Accepted Answer Score 27
01:12 Answer 2 Score 52
02:02 Answer 3 Score 6
02:22 Answer 4 Score 5
03:25 Thank you

--

Full question
https://superuser.com/questions/462912/a...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#uac #visualstudio #windows8

#avk47



ANSWER 1

Score 52


The Only way I'm aware of which ensures it will always open as Administrator (including when you open from file associations, jump list etc) is:

  1. Locate the devenv.exe file in Explorer eg mine is in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\

  2. Right-click devenv.exe and choose "Troubleshoot compatibility"

  3. Select "Troubleshoot program"

  4. Select "This program requires additional permissions"

You'll need to let it launch VS before it lets you click Next, but then you're done.

EXTREMELY annoying that you can't just do this through the normal properties dialog any more. It's like Microsoft are going out of their way to ensure Windows 8 alienates as many people as possible...




ACCEPTED ANSWER

Score 27


  1. Right click on the "Metro" Icon for Visual Studio 2012

  2. Click "Open File Location". It will put you into the classic windows desktop with the shortcut for Visual Studio.

  3. Right-Click on that shortcut and go to "Properties"

  4. Click "Advanced"

  5. Check "Run as Administrator" and click OK.

From now on, it will always launch as Administrator with elevated privileges.

You will need to do this for every shortcut you have to Visual Studio.

I.e., if you also have pinned Visual Studio to the task bar.

  1. Right-Click the icon.

  2. Right-Click 'Visual Studio 2012'

  3. Then carry on from step 3 above.




ANSWER 3

Score 6


Had the same issue, teammate suggested solution that worked for me is to install VSCommands for Visual Studio 2012, then open VSCommands config, set IDE Enhancements - General - Always start Visual Studio with elevated permissions.




ANSWER 4

Score 5


I posted about this on Stack Overflow before finding this question and then tried everything the other answers here suggested. I started running into some issues right away though.

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.

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. Visual Studio would open but then I'd get an error saying There was a problem sending the command to the program. and they wouldn't open.

This left me having to use the open file dialog if I wanted to open any non solution/project file.

Despite 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. The key to edit is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
EnableLUA - DWORD 1-Enabled, 0-Disabled

After changing this Windows will prompt you to restart. Once restarted you'll be back to everything running with admin permissions if you're an admin. The issues I reported above are now gone as well.