Sunday, December 09, 2007

Vista WLW Drag and Drop Annoyance: Fixed!

I cannot believe how annoying this issue with Vista has been for me. And how easy it was to fix.

Background

I use Firefox as my primary web-browser. As I surf daily, I collect topics and links for blog posts. These are dropped as bookmarks into a "To Blog" folder in my Firefox bookmark folder. When it comes time to begin composing blog-posts I open up the folder in my Firefox sidebar and go to work.

Then I fire up my blogging platform, Windows Live Writer.

I compose, I edit, I copy and paste text and links.

One of the quickest ways to speed my writing is to drag HTML formatted links (bookmarks or page links) or sometimes linked images directly from Firefox over into my Windows Live Writer page and drop them. They are placed into Windows Live Writer still all pre-formatted in HTML and everything. Then I can edit them as needed.

Actually it works great in both Internet Explorer and Firefox on my XP systems.

Only one problem, direct drag and drop does not work on Vista between IE or Firefox and Windows Live Writer.

I can select a bookmark, copy, then paste it into Windows Live Writer.

I can select and copy a HTML formatted link on a web-page, and paste it into Windows Live Writer.

I cannot, and despite all attempts, could not drag and drop what I wanted from the browser into Windows Live Writer.

This behavior occurs even though my profile is an "administrator" account.

This seems like a really petty issue, but it has been highly annoying. I think a large number of other users have been running into this issue as well.

Then I worked out what is going on and how to quickly (and safely/securely) resolve it.

The Reason (I think)

From what I can gather, Vista runs both Firefox and Internet Explorer under a reduced security level user token. I gather this is for security reasons with Vista and it makes sense. You don't want bad-things you encounter on the Net jumping out of your Administrator-privilege running browser and impacting your system.

Now, one would think that since by default Windows Live Writer and the web browser both don't run as "administrators" you shouldn't have any issues dragging and dropping material between them (like it works in XP) but I think that the browser actually runs with a lower user security token than usual.

That's why in some programs, drag and drop works just fine between some applications and others it does not.

So, now that we understand this, how do we work around it, relatively safely?

Method One: VERY DANGEROUS--NOT RECOMMENDED

To test my theory,

  1. I created a new shortcut on my desktop for my Firefox icon.
  2. I right-clicked on the icon and selected the "properties" option
  3. Then I clicked on the "Compatibility" tab at the top.
  4. Next under the "Privilege Level" area I ticked the "Run this program as an administrator"
  5. I applied the changes and clicked "OK"

I launched Windows Live Writer. I launched Firefox and tried the direct drag and drop action.

It worked perfectly!

However, this allows EVERY instance of Firefox to run as Administrator.

So this wasn't a good solution after all.

I did not want to regularly run my web-browser sessions under "administrator" security privileges just to let me drag and drop links while blogging. It wasn't safe or secure for general web-surfing activity.

What to do....make a batch file that runs an escalated version, perhaps?

Nahh. Vista actually makes it much easier!

Method Two: Not Quite as Dangerous...Recommended with Caution

Vista actually allows you to make singular shortcuts that by themselves only can launch the target application with "administrator" privileges, but without changing the properties of the target application to run as administrator for all other icons and shortcuts that link to it. This is a very helpful and powerful ability to use.

What I did was this:

  1. I created a new shortcut on my desktop for my Firefox icon.
  2. I right-clicked on the icon and selected the "properties" option
  3. I clicked the "Shortcut" tab to select it.
  4. I then clicked the "Advanced" button at the bottom. This brings up the "Advanced Properties" window.
  5. Next I ticked the "Run as administrator" box. Note what the description says: "This option allows you to run this shortcut as an administrator, while protecting your computer from unauthorized activity."
  6. Click "OK"
  7. I applied the changes and clicked "OK"
  8. Finally, I renamed the icon to "Firefox (Admin)"

I launched Windows Live Writer. I launched Firefox from my new "Firefox (Admin)" shortcut and tried the drag and drop.

Drag and drop between Firefox and Windows Live Writer worked perfectly!

This method allows me to use my regular Firefox shortcuts to run with the standard (and safe) security levels. But when I am ready to blog and use links from sites I have already found to be safe, I can launch my "Firefox (Admin)" session and have drag and drop enabled just for blogging sessions with the browser.

How easy is that?

I ended up doing the same "tweaked Admin shortcut" thing for Internet Explorer as well. By default (on my system at least), Internet Explorer will lets me direct drag and drop between IE and Windows Live Writer, but UAC causes the following prompt to appear before I am allowed to "drop" the item.

If you do the steps I've outlined in Method Two, this doesn't appear anymore.

Just be very careful...as I have said...if you choose to do this, please do this only so you can create these shortcuts for special browsing sessions only, and do not use them for general web-surfing and wanderings.

There is still a lot of bad stuff and links on the web to get into trouble with.

--Claus

No comments: