0

IE's Protected Mode prevents one dragging the address from the IE address bar into other applications (for example Notepad). There's an informative article on MSDN about Allowing Drag and Drop Operations in your Application. If I uncheck Enable Protected Mode in IE's settings and restart IE I still cannot drag the address from the IE address bar into other Notepad.

uncheck Enable Protected Mode in IE's settings

Why doesn't disabling IE's 'Protected Mode' enable the dragging-and-dropping of addresses from the IE address bar into Notepad? Is there a way to make that work without adding a registry entry for Notepad (following the instructions in the article I mentioned)? In fact adding the following to my registry in HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Internet Explorer/Low Rights/DragDrop under a GUID key does not enable Notepad to accept these addresses

AppName (REG_SZ) = notepad.exe

AppPath (REG_SZ) = C:\Windows\System32

Policy (REG_DWORD) = 0x00000003 (3)

Why?

(N.B. This is actually part of me trying to work out how to get this address drag-and-drop working in Processing.)

2
  • 1
    I'd guess dragging and dropping that address doesn't move text around but an Internet shortcut. You see the same from Chrome, for example. This has nothing to do with permissions but instead hinges on the data format of the drag/drop.
    – Joey
    Nov 12, 2012 at 11:36
  • Excellent catch Joey! Swap that to an answer and I'll accept it. It looks like I wont be able to use Notepad to help untangle the original Processing problem.
    – dumbledad
    Nov 12, 2012 at 11:45

1 Answer 1

3

Drag and drop is a lot more complicated than just moving text around. It actually uses the same mechanism as the clipboard. Everything that is dragged has a number of formats associated with it and the sending and receiving application negotiate a bit over what each one supports until they reach a mutual agreement.

This agreement is what you see when you drag an URL from a browser to your desktop or Explorer window – it results in an Internet shortcut or .url file. This also hints that what is dragged in that case isn't the text of the URL but rather the format “URL” which Notepad is unable to accept and convert into text (well, technically it's probably just the standard Windows TextBox control since that's what Notepad is).

You can see the same issue with Chrome if you drag a URL from the address bar around.

In short: It's likely not a permission problem but rather that two applications cannot agree on a single format to marshal the dragged data.


EDIT: A little testing reveals that apparently Notepad won't accept dragged text at all but it can handle paths. So you can drag a file to Notepad but not snippets of text.

4
  • Thanks for this Joey. What had given me hope was this. If you drag-and-drop a URL from IE to the desktop one of two things happens. Normally it will create a .website file on the desktop. If you hold down shift while drag-and-dropping it will create a .url file. But either of these files can be opened in Notepad (simply using File -> Open... -> All Files
    – dumbledad
    Nov 12, 2012 at 12:09
  • Well, the fact that something is fundamentally a text format doesn't mean it has a usable text representation for the clipboard or drag/drop (as noted, the mechanisms are identical). Rich Text for example can be represented as RTF which is a text format similar to TeX but is very rarely what someone wants to see as text when you drag it around :)
    – Joey
    Nov 12, 2012 at 12:12
  • I'm still a little confused. "dragging and dropping that address doesn't move text around but an Internet shortcut". An internet shortcut is a .website or .url file. "you can drag a file to Notepad but not snippets of text". So why can't I drag a .URL file from IE's address bar onto Notepad?
    – dumbledad
    Nov 12, 2012 at 12:15
  • 1
    Don't confuse a file (which is a persisted representation of data) with live data that can be dragged or copied. The latter in this case would be the information “This is a URL: http://...” which can be persisted to a file as either .url or .website file. If you drag an actual file around it is the information “This is a file path: C:\Users\Alice\foo.txt” and Notepad knows how to open a file, given its complete path. But a website URL isn't a file system path. My wording in the answer might have been a bit sloppy in that regard; I apologise.
    – Joey
    Nov 12, 2012 at 12:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .