Application Compatibility Issue
Because of the significant changes to the user profile namespace beginning with Windows Vista, particularly the new root profile folder %SystemDrive%\Users and the flattening of the profile folder hierarchy, some application compatibility issues may arise with older, third-party, and in-house developed applications. For example, if an older application developed for Windows XP has %SystemDrive%\Documents And Settings\user_name\My Documents hardcoded as the location for storing user data files created with the application, the application might fail because this path does not exist in Windows Vista and later.
To resolve these compatibility issues, a number of directory junction (DJ) points have been created within user profile folders beginning with Windows Vista. These junction points automatically cause applications trying to access older profile paths to traverse the junction and be redirected to the new profile paths used in Windows Vista and later versions. For example, a junction under %SystemDrive% named Documents And Settings points to %SystemDrive% \Users so that any older application that tries to access the nonexistent %SystemDrive% \Documents And Settings folder in Windows Vista and later versions is redirected automatically to %SystemDrive%\Users.
Junction points are super-hidden (the system and hidden attributes are set) and can be displayed by using the dir /AL command at the command prompt, where the L option displays all reparse points (junction points or symbolic links) within the current directory.
It's important to mention that directory junction (DJ) points are not designed for enumeration. This means you can't use the command dir <DJ> to list the contents under the folder to which the junction points because this results in an infinite loop. For example, %UserProfile%\AppData\Local\Application Data actually points to %UserProfile%\AppData\Local itself. To prevent this from happening, there is a Deny Read access control entry (ACE) on these DJs. Instead of enumeration, applications can access only files directly using a path that contains the DJ. For example, you can't use the command dir %UserName%\My Documents, but if you have a Example.txt file in your Documents directory, you can use Notepad %UserProfile% \My Documents\Example.txt to open the file directly.
One impact of this change is that you cannot use the traditional XCopy command to copy user profiles anymore because it doesn't handle DJs correctly. Instead, you should use the new Robocopy command (which is included in Windows Vista and later versions) because it has an /XJD option to ignore all DJs during the copy.
Windows Vista and later versions actually use two types of junction points:
- Per-user junctions Per-user junctions are created inside user profiles to provide compatibility for older applications. The junction from %SystemDrive%\Users \user_name\My Documents to C:\Users\user_name\Documents is an example of a per-user junction created by the Profile service when the user profile is created.
- System junctions System junctions include any other junctions created on the system that are not located within the user profile namespace for a user that has logged on to the system. The junction from %SystemDrive%\Documents And Settings to %SystemDrive%\Users is an example of a system junction created when Windows Vista and later versions are installed on the system. In addition, any junctions found in the All Users, Public, and Default User profiles are also system junctions because these profiles are never loaded.
Tables below show the various junction points implemented in Windows Vista and later versions to provide compatibility with legacy applications developed for Windows XP or Windows 2000.
Junctions Within User Profiles on Windows Vista and Later VersionsJunction Creation Location | Junction Destination |
Junction for Parent Folder | |
Documents And Settings | Users |
Junctions for User Data Legacy Folders | |
Documents And Settings\ user_name\My Documents | Users\user_name\Documents |
Documents And Settings\ user_name\My Documents\ My Music | Users\user_name\Music |
Documents And Settings\ user_name\My Documents\ My Pictures | Users\user_name\Pictures |
Documents And Settings\ user_name\My Documents\ My Videos | Users\user_name\Videos |
Junctions for Per User Application Data Legacy Folders | |
Documents And Settings\ user_name\Local Settings | Users\user_name\AppData\Local |
Documents And Settings\ user_name\Local Settings\ Application Data | Users\user_name\AppData\Local |
Documents And Settings\ user_name\Local Settings\ Temporary Internet Files | Users\user_name\AppData\Local\Microsoft\Windows\ Temporary Internet Files |
Documents And Settings\ user_name\Local Settings\History | Users\user_name\AppData\Local\Microsoft\Windows\ History |
Documents And Settings\ user_name\Application Data | Users\user_name\AppData\Roaming |
Junctions for Per-User Operating System Settings Legacy Folders | |
Documents And Settings\ user_name\Cookies | Users\user_name\AppData\Roaming\Microsoft\ Windows\Cookies |
Documents And Settings\ user_name\Recent | Users\user_name\AppData\Roaming\Microsoft\ Windows\Recent Items |
Documents And Settings\ user_name\NetHood | Users\user_name\AppData\Roaming\Microsoft\ Windows\Network Shortcuts |
Documents And Settings\ user_name\PrintHood | Users\user_name\AppData\Roaming\Microsoft\ Windows\Printer Shortcuts |
Documents And Settings\ user_name\SendTo | Users\user_name\AppData\Roaming\Microsoft\ Windows\Send To |
Documents And Settings\ user_name\StartMenu | Users\user_name\AppData\Roaming\Microsoft\ Windows\Start Menu |
Documents And Settings\ user_name\Templates | Users\user_name\AppData\Roaming\Microsoft\ Windows\Templates |
Junctions for Older Default User Profiles on Windows Vista and Later Versions
Junction Creation Location | Junction Destination |
Documents And Settings\Default User | Users\Default |
Documents And Settings\Default User\Desktop | Users\Default\Desktop |
Documents And Settings\Default User\My Documents | Users\Default\Documents |
Documents And Settings\Default User\Favorites | Users\Default\Favorites |
Documents And Settings\Default User\My Documents\My Music | Users\Default\Music |
Documents And Settings\Default User\My Documents\My Pictures | Users\Default\Pictures |
Documents And Settings\Default User\My Documents\My Videos | Users\Default\Videos |
Documents And Settings\Default User\Application Data | Users\Default\AppData\Roaming |
Documents And Settings\Default User\Start Menu | Users\Default\AppData\Roaming\Microsoft\ Windows\Start Menu |
Documents And Settings\Default User\Templates | Users\Default\AppData\Roaming\Microsoft\ Windows\Templates |
Program Files (Localized Name) | Program Files |
Program Files\Common Files (Localized Name) | Program Files\Local Files |
Junctions for Older All Users Folders on Windows Vista and Later Versions
Junction Creation Location | Junction Destination |
Users\All Users | ProgramData |
ProgramData\Public Desktop | Users\Public\Public Desktop |
ProgramData\Public Documents | Users\Public\Public Documents |
ProgramData\Favorites | Users\Public\Favorites |
Users\Public\Public Documents\ Public Music | Users\Public\Public Music |
Users\Public\Public Documents\ Public Pictures | Users\Public\Public Pictures |
Users\Public\Public Documents\ Public Videos | Users\Public\Public Videos |
ProgramData\Application Data | ProgramData |
ProgramData\Start Menu | ProgramData\Microsoft\Windows\Start Menu |
ProgramData\Templates | ProgramData\Microsoft\Windows\Templates |
Older Profile Folders in Which Junctions Are Not Required on Windows Vista and Later Versions
PREVIOUS Location | Reason |
Documents And Settings\ user_name\Desktop | Handled by the junction at Documents And Settings |
Documents And Settings\ user_name\Favorites | Handled by the junction at Documents And Settings |
Documents And Settings\ user_name\Local Settings\Temp | Handled by the junction at Local Settings |
Note The junction from Users\All Users to ProgramData shown in Table is actually a symbolic link and not a junction point. Symbolic links (symlinks) were introduced in Windows Vista and are not supported on previous versions of Windows. You can create symlinks, junction points, and hard links using the mklink command. For more information on new NTFS features in Windows Vista and later versions.
In this tutorial:
- Managing Users and User Data
- Understanding User Profiles in Windows 7
- Types of User Profiles
- User Profile Namespace
- User Profile Namespace in Windows XP
- User Profile Namespace in Windows Vista and Windows 7
- Application Compatibility Issue
- Disabling Known Folders
- Windows 7 Understanding Libraries
- Working with Libraries
- Including Indexed Folders in a Library
- Adding Nonindexed Remote Locations to a Library
- Creating Additional Libraries
- Managing Libraries
- Implementing Corporate Roaming
- Understanding Roaming User Profiles and Folder Redirection
- Understanding Roaming User Profiles in Earlier Versions of Windows
- Understanding Folder Redirection in Earlier Versions of Windows
- Enhancements to Roaming User Profiles and Folder Redirection Previously Introduced in Windows Vista
- Additional Enhancements to Roaming User Profiles and Folder Redirection Introduced in Windows 7
- Improved First Logon Performance With Folder Redirection
- Implementing Folder Redirection
- Configuring the Redirection Method
- Configuring Target Folder Location
- Configuring Redirection Options
- Configuring Policy Removal Options
- Folder Redirection and Sync Center
- Considerations for Mixed Environments
- Additional Group Policy Settings for Folder Redirection
- Troubleshooting Folder Redirection
- Implementing Roaming User Profiles
- Creating a Default Network Profile
- Configuring a User Account to Use a Roaming Profile
- Implementing Mandatory Profiles
- Implementing Super-Mandatory Profiles
- Managing User Profiles Using Group Policy
- Working with Offline Files
- Enhancements to Offline Files Introduced Previously in Windows Vista
- Additional Enhancements to Offline Files Introduced in Windows 7
- Understanding Offline File Sync
- Modes of Operation in Offline Files
- Managing Offline Files
- Managing Offline Files Using Windows Explorer
- Managing Offline Files Using the Offline Files Control Panel
- Managing Offline Files Using Sync Center
- Configuring Offline Files on the Server
- Managing Offline Files Using Group Policy
- Offline Files Policy Settings Introduced in Windows Vista
- Additional Offline Files Policy Settings for Windows 7