Windows drags like crap

Vista - Dragging

Vista - Dragging

I'm cheery if you can't tell.  This is something I mean to write about a while ago, but never got around to.  If you've got Show window contents while dragging enabled on Windows (tested on XP and Vista) and try to select and drag a group of icons more than 5 icons tall, the ghosted icons fade into nothingness.  It really is a pain when you're dragging a large number of icons and the 'hidden' icons end up moving icons at your target destination.

You know what doesn't have the same problem? OS X.

OS X - Drag and Drop

OS X - Drag and Drop

Symbolic links on Windows

One of the most useful things you'll find on any Linux/UNIX variant is the ability to create symbolic links. Rather than copying a file or directory you can create a pointer to it. It's very similar to a Shortcut in Windows, but much more powerful because a symlink behaves like a normal file.

Shortcuts vs links

For example, assume you use a program that will only store it's files in C:\MUSIC. If you wanted to move the MUSIC directory to a different drive, you couldn't. If you create a shortcut called MUSIC on the C:\ drive to D:\MUSIC that won't work because the shortcut is actually a file called "MUSIC.lnk"

You could create a symbolic link from C:\MUSIC to D:\MUSIC and the program would function as expected, allowing you to move the MUSIC directory to a new drive.

Symlinks on Windows

Support for symbolic links on Windows is all over the board. Out of the box on Windows 2000 and XP you can only create links to files, and you need a separate program for linking to directories. Vista provides a new utility, but you still need to specify if you are linking to a directory or file.

fsutil

fsutil is available on Windows 2000, XP and Vista. There's actually quite a bit you can do with it, but for creating links the syntax is:

fsutil hardlink create new_filename existing_filename

If you wanted to create a link to c:\secret\passwords.txt on your desktop you'd run the following command

fsutil hardlink create %userprofiledir%\desktop\passwords.txt c:\secret\passwords.txt

You must provide the filename of the link.

Junction

Junction was created Mark Russinovich, and allows you to create links (actually junctions) to directories. It runs on Win2k, XP and Vista. To create a junction the syntax is:

junction junction directory junction target

So to create a link (junction) to c:\lodo_conversations\ on your desktop you would run:

junction %userprofile%\desktop\lodo_conversations\ c:\lodo_conversations\

junction.exe must be in your PATH and you must provide the name of the link.

To delete a junction:

junction -d %userprofile%\desktop\lodo_conversations\

mklink

mklink was introduced with Vista and allows you to create links to both directories and files, with a switch.

To link to c:\lodo_conversations\ on your desktop you would run:

mklink /d %userprofile%\desktop\lodo_conversations\ c:\lodo_conversations\

To remove that link

rmdir %userprofile%\desktop\lodo_conversations\

To create a link to c:\secret\passwords.txt on your desktop you'd run the following command

mklink %userprofiledir%\desktop\passwords.txt c:\secret\passwords.txt

Extract Content from a MSI File

Periodically I forget how to do this, so this is a self-gratifying post to save myself time in the future. I've been using SugarSync to keep files in sync across my various computers, and I've got a c:\cfg-bin\ on Windows that I use. I've got most of the Sysinternals utilities, and other goodies like fport, junction, and depends.

On Vista I use Frameworkx's Vista Shortcut Manager to change the overlaid shortcut icon to be something less obtrusive.

Anyways it's a very simple command:

msiexec /a <path to MSI file> /qb TARGETDIR=<path to destination folder>

So to extract FxVisor32.msi to C:\cfg-bin\Vista Shortcut Manager you'd run:

msiexec /a FxVisor32.msi /qb TARGETDIR="C:\cfg-bin\Vista Shortcut Manager"

Fixing Windows Easy Transfer

I've been evaluating Tablet PCs for a few months now, and prior to returning the wonderful Motion Computing LE1700 I used the Vista Migration Wizard to backup all of my settings. In reality the only thing I really cared about was the handwriting recognition settings. Since Vista learns from your writing and corrections this represented many, many hours of work.

I just received a spiffy new-ish Lenovo X61 Tablet PC to evaluate, but when I launched the Migration Wizard (technically it's called Windows Easy Transfer or WET) I received a nasty surprise. You're given a prompt to restore from a network drive, USB flash drive or external hard drive. Since I was using a USB flash drive, I naturally chose that.

Then I received an error message that read:

Please insert the first disk to read into the drive you have selected.

Huh?

I tried restarting WET a few times without any luck. I copied the .MIG file to the root of the C:\ drive and tried opening it from there and received a new, yet equally annoying message:

Please select a valid file where your data can be restored from.

A few Google searches reveal that this is a common problem, there is no way to browse the contents of a .MIG file, and WET is a piece of crap that you shouldn't trust with your valuable settings and documents.

Not willing to give up I ran WET one final time and chose External Hard Drive as the source. Success! A few minutes later and all of my settings were restored. Oddly enough after it worked once I was able to open the .MIG file directly and have WET recognize it, or choose USB Flash Drive as the source without any issues.

What worked?

For the most part everything I asked WET to save transferred. My wireless networks did, but oddly enough none of the WEP passwords. Saved network passwords did transfer. WebDAV-synced OneNote notebooks and settings also transferred.


© 2007-2012, Corey Gilmore | Posts RSS Feed | Comments RSS Feed | Contact

 

The views expressed on these pages are mine alone and not those of any past or present employer. All information presented on this site was obtained lawfully and not through disclosure under the terms of an NDA.