Subscribe to Windows IT Pro
June 28, 2005 12:00 AM

Reparse Points Solve Path Problems

Windows IT Pro
InstantDoc ID #46607
Rating: (3)

We have a program at work that manages users' profiles. This program had been developed to work under Windows NT 4.0, whereas we needed it to run under Windows 2000. When we tried to use it with Win2K, we ran into a problem: The program was hard-coded to use the C:\Winnt\Profiles path and offered no way to configure it to use the C:\Documents and Settings path. Unfortunately, the original developer had left the job, and there was no source code for this program.

After searching the folder in which I keep all my administrative tools and utilities, I found the right tool for the job: Sysinternals' Junction (http://www.sysinternals.com/
ntw2k/source/misc.shtml). This command-line program creates reparse points to NTFS-formatted hard disks. You first create the folder you want to appear as the "real" one (C:\Winnt\Profiles, in my case), then run Junction following the syntax

junction <your real folder>
  <the fake folder>

In my case, the command was

junction "c:\documents and settings"
  c:\winnt\profiles

Now, the C:\Winnt\Profiles folder points to C:\Documents and Settings.

It's important to understand that your files don't replicate. Junction just creates a pointer. So, every change you make to either folder is actually reflected in the other folder as well.

Related Content:

ARTICLE TOOLS

Comments
  • Karen
    3 years ago
    Jan 21, 2009

    I contacted Apostolos Fotakelis about your concern. He commented:

    “The reader is correct. As I mention in the article, it’s important to understand that your files don't replicate. The Junction program just creates a pointer, so every change you make to either folder is reflected in the other folder as well.”

    Thanks for reading Windows IT Pro!

    Karen Bemowski, senior editor
    Windows IT Pro, SQL Server Magazine

  • John
    3 years ago
    Jan 17, 2009

    Junction points are very tricky and users should be aware that a junction point is not just a short cut. If the destination (ie sort cut) is delectied the source will also be dleted.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.