views:

4204

answers:

5

Problem: I relied heavily on NTFS Junction points in Windows XP, even though they apparently were not an "official" feature of the operating system. Now MSFT has generously made NTFS Junction points an official part of Vista, but apparently they also intentionally broke them. Now my WinXP-created junction points on portable USB drive don't work when I plug that drive into a Vista box.

Questions: Does anyone have a script that will force NTFS junctions created on XP to work correctly within BOTH Vista and XP? Is there documentation or a spec that explains what MSFT did to cause this breakage?

Update: Thanks, Ulrich and Scott, for your follow-up questions. The tool I used to create the junctions was Systinternals Junction v1.05 although I can't say for sure that all of them were created with that specific version of the now-MSFT-hosted app.

As far as how the junctions are used ... assuming an external "Q Drive" device:

  • 1) Some items on the Q Drive are junctions that point from one place on the Q Drive to another place on the Q Drive (e.g., cases where I needed to have a folder in more than one place, and a traditional .lnk style shortcut would not work)

  • 2) Some items are junctions that point from the C Drive directly to locations on the Q Drive. These items obviously do not work when the Q Drive is not actually connected box (XP or Vista), but when connected on Vista, the junctions do not work as on XP.

+2  A: 

What you trying to link to? Are you linking TO your portable drive or FROM your drive? Are you using "mklink /d"?

Scott Hanselman
+2  A: 

Why don't you try with this program (freeware) to create the links. Apparently Windows Vista needs a different version. I have tried both versions (XP and Vista) and they work. I know it doesn't have to do with your specific problem, but given that there are separate versions for each OS, there might be diferences in the way Junctions are created.

The tool you have used is rather old (2007) and doesn't mention Windows Vista. I know that MSFT did change something in the Junction Points in order to add some functionality they wanted to use. Vista is more authoritative when it comes to Program Files folders and such.

Martín Marconcini
+5  A: 

Junctions and symbolic links are two different types of NTFS objects and are not exactly the same thing. Why your junctions are not recognized in Vista is a mystery, but the junction functionality still exists in Vista and it not purposefully broken.

You can use mklink (http://technet.microsoft.com/en-us/library/cc753194.aspx) to create soft links (the default), hard links (/h), or junctions (/j). The biggest improvement of sym links over junctions is sym links can reference files OR directories (junctions are directory only) and the can reference network shares as well (junctions cannot).

But the bottom line is they are different. Can't tell you why your existing junctions are not recognized by Vista though. You can still create them as described above.

There freeware utility referenced in another post (LinkMagic) is your best bet to getting your junctions working again. Or recreate them with mklink.

Mitch Schroeter
+2  A: 

Besides the Linkmagic program already suggested in one of the previous comments, Link shell extension is another good program to manipulate (and check) links and junctions:

http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

Both of these programs can tell you what the existing links/junctions point to, and what they are. This may help you in figuring out what's wrong.

+1  A: 

Junctions points within the same volume should work - they should be hardlinked directories.

Have you tried if the USB drive works between XP machines? It might not work.

I know that for vista the volumes are NOT identified by path (Q:) but by volume GUID. The $MFT_REPARSE_POINT format might have changed from XP to Vista to accomodate this. Under Vista, this mean that even if your Q drive is suddenly X, the junction point shoudl still work, where under XP it would be broken.

Dominik Weber