Microsoft KB Archive/811660

= Files that you add to the Offline Files folder on a Windows XP-based computer are synchronized when another person uses the computer =

Article ID: 811660

Article Last Modified on 8/29/2007

-

APPLIES TO


 * Microsoft Windows XP Professional
 * Microsoft Windows XP Home Edition

-



Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SYMPTOMS
If you add files to the Offline Files folder on a Microsoft Windows XP-based computer that is shared by more than one user, offline synchronization of those files will occur when another user logs on to that computer. Network shares and Web sites that require your security credentials cannot synchronize and will prompt other users to submit the correct credentials.



CAUSE
When you add files to the Offline Files folder, these files are synchronized whenever the computer connects to the network. Synchronization occurs when the computer connects to the network, not when a user logs on to the computer.

The Offline File folder cache is a mirror of the network file system. File access is based upon the same administrative credentials. Files on the network file system that grant access to everyone and that have been added by a user to the Offline File folder will be synchronized, regardless of who logs on to the computer. Therefore, when a user connects to the network on a shared computer, that user must wait until all files in the Offline Files folder are synchronized, whether the user wants to synchronize those files or not.



Service pack information
To resolve this problem, obtain the latest service pack for Windows XP. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

322389 How to obtain the latest Windows XP service pack

Hotfix information
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Windows XP
Date        Time   Version          Size  File name

30-Dec-2002 08:20  5.1.2600.108  313,856  Cscui.dll

Windows XP Service Pack 1
Date        Time   Version           Size  File name - 31-Dec-2002 07:23  5.1.2600.1152  312,832  Cscui.dll



MORE INFORMATION
This hotfix includes four primary additions to Offline Files. To apply the additions that you want to use, you must edit the registry as directed in the section of this article that describes the specific addition. The four primary additions are:
 * Exclusion error suppression
 * Purge files for non-primary users at logoff
 * Prevent admin pinning of files for non-primary users
 * Forced silent auto reconnection

Only the Offline Files feature of Windows XP uses these additions. Microsoft does not support or recommend any other use for these additions.

Exclusion error suppression
The Offline Files feature does not permit you to cache certain file types. This restriction prevents corruption of file sets and avoids conflicts with competing synchronization technologies. When you try to cache one of these file types, you may receive the following error message for each file:

Files of this type cannot be made available offline

This message is useful to users who are unfamiliar with the synchronization process. However, when users understand that certain file types cannot be cached, the message becomes an annoyance, because the message prevents the synchronization progress dialog box from closing automatically at the end of synchronization. This hotfix introduces a new registry key that prevents subsets of these files from generating this specific synchronization error. After you apply this hotfix, you must edit the registry and enter the appropriate file specification for the following registry subkeys:

These subkeys can contain zero or more values. The values are known as &quot;file specifications.&quot;

At runtime, the lists under these two registry subkeys are merged into a single list. One list does not take precedence over the other. An empty key and a missing key are treated in the same way. An empty key and a missing key each produce a list of zero items.

File specifications
The file specifications that you add to the new keys are Universal Naming Convention (UNC) path strings. These path strings may incorporate a wildcard character (asterisk) to indicate “match any” at that particular position in the specification.

Each file specification uses the following format:

\\ \ \ \

You can include environment variables, such as the variable, in a specification. A variable is expanded at runtime to the equivalent text value.

You can substitute the wildcard character for any part of the file specification and for the folder designation. For example,

\\corpsvr\staff\%username%\documents\*\*.doc

However, you cannot substitute the wildcard character for a folder that is followed by another folder name. For example, the following specification is not valid:

\\corpsvr\staff\%username%\documents\*\personal\*.doc

This specification is rejected because the specification embeds a wildcard character between the folder names %username% and personal.'''

Note''' Windows XP does not recognize invalid specifications and does not log invalid specifications anywhere in the system. Window XP ignores invalid specifications at runtime.

Examples of the file specifications are:
 * \\*\*\*\*.dbf

This example suppresses the specification error for any file with the extension .dbf in any folder, on any share, and from any server.
 * \\ \*\*\*.dbf

This example suppresses the specification error for any file with the extension .dbf in any folder and on any share on the specified server.
 * \\ \\*\*\*\Test.dbf

This example suppresses the specification error for any file with the name &quot;Test.dbf&quot; in any folder, on any share, and from any server.
 * \\ \ \ \Test.dbf

This example suppresses the specification error for a specific file with the name &quot;Test.dbf&quot;.

This example suppresses any file in any folder on the specified share from the specified server.
 * \\ \ \%username%\*\Test.dbf

This example suppresses files with the name &quot;Test.dbf&quot; in any user’s home folder that is defined by the environment variable %username%.

To add the ExclusionErrorSuppressionList registry keys and to enter the file specifications that you want, follow these steps after you apply the hotfix.

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.  Click Start, click Run, type regedit, and then click OK. Locate and click the following registry subkey:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\NetCache

 Click Edit, point to New, and then click Key. Type ExclusionErrorSuppressionList, and then press ENTER to name the new key. Click, click Edit, point to New, and then click DWORD Value.</li> Type the file specification that you want to use, and then press ENTER to name the value.</li> Repeat steps 5 through 6 for each file specification that you want to use.</li></ol>

System behavior
When the synchronization process encounters a file that is on the exclusion list, the file’s complete path is tested against the list of file specifications that are read from the registry. If the file's path matches any one of the specifications, the &quot;files of this type cannot be made available offline&quot; error message does not appear in the synchronization progress dialog. Windows XP does not record the suppression of this error message.

Purge files for non-primary users at logoff
When a user briefly logs onto a computer that is not the user's regular workplace computer, and the user caches files from the network, either by autocaching or by pinning, those files remain in the cache on that computer until the files are removed.

The feature changes that are included in this hotfix introduce a new registry key that designates users of a computer as either primary or non-primary. With this designation, files that are cached for a non-primary user can be removed from the cache when the user logs off. This registry key contains zero or more values, and each value name designates a user account that will be considered primary by the Offline Files feature. Each value name may take one of the following forms:
 * A user account name, such as  \ 
 * A user account security ID (SID) in text form, such as S-1-5-21-397955417-626881126-188441444-2201386

The data value and the value type for each registry entry are ignored, and only the value name is used.

Windows XP uses the following process to determine if a computer user is a primary or a non-primary user:
 * 1) At runtime, Windows XP obtains the current user’s SID from the user’s security token.
 * 2) If the registry entry is provided as a SID string, Windows XP converts that string to a binary SID and compares the string to the current user’s SID. If the registry entry is provided as an account name, the Win32 API LookupAccountName function queries the security authority for that account's SID.
 * 3) The SID is then compared with the current user’s SID.
 * 4) If a match is found in the list of primary users that is read from the registry, the current user is considered a primary user. If no registry entries exist or no match is found, the user is considered a non-primary user. Windows XP ignores invalid entries in this registry key. and does not create a system log entry to identify invalid entries.

Note This list of primary users affects only the Offline Files feature. No other Windows component uses this list, and Microsoft does not support any other use of this list.

To apply this feature change, follow these steps: <ol> Click Start, click Run, type regedit, and then click OK.</li> Locate and click the following registry subkey:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\NetCache

</li> Click Edit, point to New, and then click Key.</li> Type PrimaryUsers, and then press ENTER to name the new key.</li> Click, click Edit, point to New, and then click DWORD Value.</li> Use one of the following formats to type a user name: <ul>  \ </li>  S-1-5-21-397955417-626881126-188441444-2201386

This is a user account security ID (SID) in text form.</li></ul> </li> Click, click Edit, point to New, and then click DWORD Value.</li> Type PurgeNonPrimaryUserFilesAtLogoff, and then press ENTER to name the value.</li> Double-click .</li> In the Value data box, type 1, and then click OK.</li></ol>

Warning You must coordinate the addition of this registry key with the existing PurgeAtLogoff system policy. This policy is activated in Group Policy through the following path:

Computer Configuration\Administrative Templates\Network\Offline Files\At logoff, delete local copy of user’s offline files

If you enable this policy, the PurgeNonPrimaryUserFilesAtLogoff registry value is ignored, and files for non-primary users will not be removed.

Note
 * You must use the AdminPinForPrimaryUsersOnly registry setting. (See the &quot;Prevent admin pinning of files for non-primary users&quot; section.) If the AdminPinForPrimaryUsersOnly registry setting does not exist, and admin pinning is in progress when the non-primary user logs off, a race condition occurs and admin pinning continues to run after files have been removed from the cache. Therefore, after logoff, files may be cached for the non-primary user. The solution is to disable admin pinning for non-primary users by using the AdminPinForPrimaryUsersOnly registry entry.
 * Because the selection of files for deletion is based on user access to those files, and because Client Side Caching (CSC) does not cache security information for folder entries in Windows 2000 and Windows XP, an empty folder entry that has been pinned by another user may be removed from the cache. However, if the cached folder contains any cached subdirectories or files, the folder will not be removed.
 * Autocaching occurs when any process on the computer opens a file on a remote share that is marked for autocaching. Files that are deleted may be replaced before the logoff sequence is completed. If this is a problem, you may want to disable autocaching on shares that host these redirected shell special folders. For example, you might disable autocaching on the My Pictures, My Music, and My Videos folders.
 * If you enable the  registry key and a non-primary user is logged on, when the non-primary user makes offline changes to any cached files, those modified files are not removed from the cache during the deletion process. This scenario preserves any potentially valuable offline content. Therefore, some files that are cached by the non-primary user may remain on the local computer after the user logs off.

Prevent admin pinning of files for non-primary users
A user who has been assigned offline files for administrative purposes caches content on every computer the user logs on to. This scenario may cause unwanted content to be cached on some computers. To prevent this scenario, this hotfix introduces a modification to the processing of admin pinning. With this hotfix, admin pinning does not override the primary user list that is described in the &quot;Purge files for non-primary users at logoff&quot; section. If the current user is not in the primary users list, per-user admin pinning will not occur for that user on the current computer. To prevent per-user admin pinning for non-primary users, follow these steps: <ol> Click Start, click Run, type regedit, and then click OK.</li> <li>Locate and click the following registry subkey:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\NetCache

</li> <li>Click Edit, point to New, and then click DWORD Value.</li> <li>Type AdminPinForPrimaryUsersOnly, and then press ENTER to name the value.</li> <li>Double-click .</li> <li>In the Value data box, type 1, and then click OK.</li></ol>

Forced silent auto reconnection
When a server has been unavailable (offline mode) and then becomes available again for connection, Offline Files Client Side Caching tries to transition that server to online mode if all the following conditions are true:
 * There are no offline changes for that server on the local computer.
 * There are no open file handles for that server on the local computer.
 * The server is accessed over a “fast” link. You can adjust the definition of “slow” and “fast” by using the SlowLinkSpeed Offline Files policy.

With this hotfix, you can configure Offline Files Client Side Caching to ignore these conditions and transition the server to online mode regardless of whether these conditions exist. To do this, follow these steps: <ol> <li>Click Start, click Run, type REGEDIT, and then click OK.</li> <li>Locate and click the following registry subkey:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\NetCache

</li> <li>Click Edit, point to New, and then click DWORD Value.</li> <li>Type SilentForcedAutoReconnect, and then press ENTER to name the value.</li> <li>Double-click .</li> <li>In the Value data box, type 1, and then click OK.</li></ol>

Note After you apply this hotfix, the following behavior may occur:
 * Any offline changes will remain unsynchronized and unavailable until the changes are synchronized in the future. This situation causes a dirty cache condition that is announced through a small warning overlay image on the Offline Files icon in the notification area.
 * Any open handles to files that are cached on the associated server will be automatically closed and invalidated. This action may cause problems if the programs that are using those files cannot work gracefully with invalid file handles.
 * If the server is available over a slow network link, such as a satellite link or a telephone line, the server will still be transitioned online. This scenario may cause very slow access to the remote file system on the server from the local computer.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section. This problem was first corrected in Microsoft Windows XP Service Pack 2.

Keywords: kbhotfixserver kbwinxpsp2fix kbqfe kbwinxppresp2fix kbfix kbbug KB811660

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.