The Pitfalls of Visual Studio 2012, Windows 8 and UAC
Shortly after installing Windows 8 and Visual Studio 2012 I opened up an existing MVC project and tried to work on it a bit. I say try because I was quickly greeted with a dialog box telling me that I couldn’t debug and attach to IIS without first restarting Visual Studio with elevated permissions. This was a shock to me because one of the first things I did when I booted into Windows 8 for the first time was turn off UAC. Or so I thought.
Windows 8 no longer allows you to turn off UAC like you could in Vista or Windows 7. The slider in the UAC settings screen only adjusts how much it will nag you with confirmation screens and there is no more fully disabled option.
This lead me to posting a question on Stack Overflow, followed by finding this question on Super User. So based on those answers I tried setting the always run as an administrator option on the Start Screen shortcut as well as my taskbar’s pinned shortcut. This seemed to work and even loaded Visual Studio as an administrator when opening solutions from Explorer (which others claim doesn’t work, but does for me when setting both shortcuts).
After updating the shortcuts I then installed VSCommands so I could try the option to always run with elevated permissions. This option aside, VSCommands is worth installing just for the solution badges and updated window title text (note to the VS team: this is how you improve the UI, not by removing all the color and making menus all caps).
Now with Visual Studio set to all around run with elevated permissions I got back to trying to get some work done but this didn’t last very long. Shortly after I tried to drag & drop an XML file into my open instance of Visual Studio but this wouldn’t work. No matter where I tried to drop the file Visual Studio simply wanted nothing to do with it. Then I tried double clicking it in Explorer (I have XML files associated to Visual Studio) and was then greeted with an error message that said:
There was a problem sending the command to the program.
My final conclusion is that when UAC is turned on and an application is running with elevated permissions it can only communicate with other applications of the same elevation. So since Explorer isn’t running as an administrator it can’t interact with Visual Studio.
After already loosing Windows Media Center after my upgrade (gotta wait till the retail release date to buy that), losing my Start Menu (makes an always hidden task bar harder to use), being gifted a monochromatic IDE, and then these UAC problems all I can ask Microsoft is do they use their own products anymore? It’s shocking to see so many glaring issues after only using these products for a couple days, and now a couple weeks later there’s even more showing up.
“Fixing” The UAC Issue
The end result of always running with elevated permissions was to use the good old registry to turn it off for good. The registry key to do this is:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\SystemEnableLUA - DWORD 1-Enabled, 0-Disabled
The catch to turning UAC off entirely is Metro Apps no longer work, not that that’s a bad thing, but for anyone trying to get things done with this OS you won’t be used a Metro App anyhow I did notice that I lost my overlay icons with SkyDrive, but I think that’s the least of my UI problems at this point.
Now to see how long it takes before I reinstall Windows 7.