Adsense

Wednesday, August 12, 2009

Drag and Drop files in Windows 7 with User Account Control (UAC) enabled causes issues.

I took the plunge and updated to Windows 7 x64 on my development machine. It has been a fairly pleasant experience for the most part. No major problems with installation, setup, drivers, or getting my development environment configured correctly so that I can get back to working!

I’ve been enjoying Windows 7 so much that I decided to leave the User Account Control (UAC) active. The implementation seems to be MUCH less annoying in Windows 7 than it was in Windows Vista. You even have access to options to configure just how annoying (err, I mean secure) you want it to be.

Unfortunately, I found a deal-breaker that finally led me to disable the UAC in Windows 7. The problem started out when I was unable to drag an aspx file from my Windows Explorer window into my Visual Studio window like I’ve always done. I ended up figuring out the problem. I had the “Run as Administrator” option set for my instance of Visual Studio 2008 while my Windows Explorer was running with default permissions for my User Account. >_<

UAC is trying to protect me from processes running with lesser privileges from sending messages to processes running with Administrator privileges. Probably a valid concern, but considering that I generally NEED to run my Visual Studio as an Administrator and I really like the ability to drag an drop files into it… UAC has gone the way of the Dodo once more (at least on my machine.) I also ran into this issue when trying to drag files into my SQL Server 2008 Management Studio. This one isn’t as critical since it really doesn’t need to be run as Administrator, but annoying just the same.

Hope this might help someone else figure out why Dragging and Dropping between processes no longer works for them in some instances!

~ Paul

9 comments:

JAK said...

I was having the same problem with dragging file to apps.
I found your post and solved my problem. :)

John said...

I've been having the same problem, but I've had UAC off from the start. Is there something else I need to change besides turning UAC off so that drag and drop will always work?

Paul Fox said...

Good question. Turning off UAC seemed to fix all of the issues I was having dragging and dropping from Windows Explorer into my applications. What exactly are you trying to drag and drop?

rv said...

thanks. =)
That solved my problem drag-n-dropping to Cobian Backup.

Unknown said...

One way I have found to fix this without completely disabling UAC is changing onle one UAC feature within the Local Security Policies. This way your computer still remains s little more secured than just simply shutting UAC off.

Control Panel > Administrative Tools > Local Security Policy > Local Policies > Security Options > User Account Control: Only elevate UIaccess applications that are installed in secure locations

Disable this option.

One other method which I prefer so you don't have to disable this feature, is to uninstall the program we are having issues with. Then create a folder in the root of the C drive called 'Non Secured Programs'. Once the new folder is created, then install the software back but install it in this new folder instead of the 'Program Files' folder. This way its not in a secure location.

Paul Fox said...

Thanks for the great comment drock. I think I will try to re-enable UAC and play with my Local Security Policies to fix the issue (considering this was the only UAC issue that I couldn't live with.)

I appreciate the great feedback.

Anonymous said...

Just wanted to drop a quick thanks for this. I've been trying to get d&d working again for days, I never thought to check UAC. You, my friend, are a life saver.

Anonymous said...

I used the following with 1 exception. Instead of selecting enable for the inclusion list and entering all of the file types. I just clicked disable. No more warning.

http://forums.techguy.org/windows-xp/843951-how-disable-windows-security-warning.html

Click on Start, Run and type gpedit.msc.

- User Configuration
- Administrative Templates
- Windows Components
- Attachment Manager

Then, set Inclusion list for low file types to Enabled and enter the file types you don’t want to be warned about in the box, like .exe. If you want to add multiple entries, separate them by a semi colon.
Once you’re done, hit the Ok button and the warning messages should go away for the files extensions you listed here.

Anonymous said...
This comment has been removed by a blog administrator.