WIN7系统中连接点(Junction Points)

与xp、win2003相比,win7、win2008(包括win2008R2)系统中,存放用户数据(user data)和系统数据(system data)的默认文件夹位置发生变化。例如,在xp中存放用户数据的文件为%SystemDrive%\Documents and Settings;在win7中则为%SystemDriver%\User。这样的变化无疑对以前应用程序能否在win7下顺利带来兼容性问题。为了最大程度地保证对以前在xp运行程序的兼容性,在win7中采用了junction points(连接点)技术。通过这个技术,原来在xp下运行的程序对%SystemDrive%\Documents and Settings文件夹下的数据存取操作,能自动的更改到%SystemDriver%\User文件夹。

我们可以将junction point看做是一个快捷方式(shortcut) ,它具有以下特性:

  • 具有FILE_ATTRIBUTE_REPARSE_POINT, FILE_ATTRIBUTE_HIDDEN, and FILE_ATTRIBUTE_SYSTEM属性
  • 具有ACLs(Access Control Lists),拒绝everyone的读操作

这样,在win7系统中,只有具有存取权限,旧程序对老式路径的调用会通过 junction point,转而存取win7下的用户数据文件或系统数据文件夹。

例如win7为每个用户创建连接点,将旧式的 C:\Users\username\My Documents指向win7下C:\Users\username\Documents。 下表是

xp、windows2003中的路径

win7、windows2008中的路径

\Documents and Settings

\Users

\Documents and Settings\Default User or
%LOGONSERVER%\NETLOGON\Default User

\Users\Default or
%LOGONSERVER%\NETLOGON\Default

\Documents and Settings\<user>\My Documents

\Users\<user>\Documents

\Documents and Settings\<user>\My Documents\My Pictures

\Users\<user>\Pictures

\Documents and Settings\<user>\My Documents\My Music

\Users\<user>\Music

\Documents and Settings\<user>\Favorites

\Users\<user>\Favorites

N/A

\Users\<user>\Contacts

N/A

\Users\<user>\Downloads

N/A

\Users\<user>\SavedGames

\Documents and Settings\<user>\Application Data

\Users\<user>\AppData\Roaming

\Documents and Settings\<user>\Local Settings\Application Data

\Users\<user>\AppData\Local

\Documents and Settings\<user>\Start Menu

\Users\<user>\AppData\Roaming\Microsoft\Windows\ Start Menu

\Documents and Settings\All Users

\Users\Public

\Documents and Settings\All Users\Start Menu

\ProgramData\Microsoft\Windows\Start Menu

\Documents and Settings\All Users\Desktop

\Users\Public\Desktop

 

参考:

1. junction point in vista 

2. managing roaming user data delployment guide

posted @ 2012-12-21 00:46  protorock  阅读(1972)  评论(0编辑  收藏  举报