3

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?

  • You don't indicate what version of Visual Studio you are using. You should also spend time to format your question so it isn't one giant block of text. There is no way to disable UAC and run any 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. – Ramhound Jul 19 '16 at 16:55
  • @Ramhound Well it's really any version of VS. He requested I put 2005, 2008, 2010, and 2015 on this computer (not sure why it's all necessary, just giving him what he wants) and none of them will allow DnD when run as Admin (also not sure why he needs to do that, but he's quite insistant on it). So I've re-enabled UAC and Windows apps work now, however I'm back to not being able to DnD into VS when running as Admin. – akenawell85x Jul 19 '16 at 17:19
  • It isn't required. You can have been able to target specific versions of the .NET Framework ever since Visual Studio 2008 was released. I verfiied on multiple virtual machines, with different version of Visual Studio, that DnD functionality was not effected by running it as an Administrator (which again is not required to perform any action within Visual Studio). These VMs had multiple snapshots with different versions of Windows, so I am pretty sure, this is a configuration problem on the machine your testing. – Ramhound Jul 19 '16 at 17:37
  • Drag and Drop from a standard user process (Medium integrity level) to an elevated process (High integrity) never works because it would be a security flaw. A normal user could open a file in a elevated process. Running Visual Studio as admin is sometimes required when you need to debug processes. The only way to drag files onto an elevated VS 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. – Peter Hahndorf Jul 19 '16 at 17:52
  • @PeterHahndorf winfile worked awesome! Thank you!!! – akenawell85x Jul 19 '16 at 19:04
4

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.

| improve this answer | |
  • I used 7zips File Manager successfully. Figured it was worth mentioning as most devs probably already have this installed. – Chris Nevill Sep 30 '16 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.