I'm building a new Win10 computer for one of the developers at my company and he's a bit...finicky...about how he likes things set up.
One thing that is an absolute must is that he has to be able to drag and drop files into Visual Studio. This works fine normally, but for testing he has to run Visual Studio as admin which for some reason disables the drag and drop feature.
I've done a bit of googling on the subject and basically come across:
Local Security Policy> Local Policies > Security Options > Administrator Account Status: set to enabled.
-or-
Turning off UAC in the registry instead of control panel:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
\CurrentVersion\Policies\System.
This works for being able to run VS as admin and be able to drag and drop files into VS.
HOWEVER, now none of the Windows apps will work,
ie: Edge cannot be run in the built-in administrator account. Even the Calculator, FFS, won't run.
I've found the solution to make VS work the way I need it, and the solution to get the Microsoft apps to work properly, but no solution on how to make them BOTH work at the same time.
So my question is:
Is there anyway I can get Windows 10 to have its cake and eat it too so that I don't have to listen to this Dev whine at me after I give him his new computer?
1 Answer
Drag and Drop from a standard user process (Medium integrity level) to an elevated process (High integrity) never works because it could be used in a Privilege escalation attack. A normal user could open a file in an elevated process and potentially execute some code with higher privilege than he holds.
Running Visual Studio as admin is sometimes required when you need to debug processes where the user need permissions to attach the debugger to an existing process like a Windows Service. When debugging ASP.Net application running IIS many people also started Visual Studio as admin.
The only way to drag files onto an elevated Visual Studio is to drag it from another elevated process. So using a third party file manager or even winfile.exe would make this possible, but is doesn't work with Windows File Explorer.
Still I wouldn't recommend using an elevated file manager all the time, if your developer really loves drag and drop he could use a dedicated file manager for just that purpose.
I use an elevated PowerShell session from which I can start all programs that need to run elevated as well.
-
I used 7zips File Manager successfully. Figured it was worth mentioning as most devs probably already have this installed. Sep 30, 2016 at 12:30
Universal Windows Program
. UAC must be enabled if you require the default Universal Windows Programs to work on the system. I have no problem running Visual Studio 2015 Update 3 as an Administrator (not a required step to do anything in Visual Studio I might add) and I can still drag and drop files into the solution.winfile.exe
would make this possible, but is doesn't work with Windows File Explorer.