For more information about how to configure the computer after you install the hotfix, follow these steps to achieve the desired behavior described above by scenario 1:
- Set the registry key that is described in the "Registry information" part of the Resolution section.
Note This registry entry is set per user, therefore if multiple users use a given client computer, this registry setting should be set for any user whose cached content is going to be moved. - Log off the computers that access the share folder that is going to be moved or remove the share folder from the source server. This ensures that the share folder cannot be accessed. This step also ensures that the content on the server can be successfully moved without an error message that the files are in use.
- Backup the content from the source server and restore the content to the target server. The data must be moved in a manner that will preserve file attributes, timestamps and security access. If possible, the old target shared folder should be unshared on the server to prevent the user from synchronizing data changes back to the old location after the data has been moved to the new file server.
Note Moving the data by using a backup application should be sufficient to preserve this file state. However, using a simple copy utility, such as xcopy, will not preserve the file state correctly. - Update the Folder Redirection configuration to reflect the target server. For example, if you redirecting to the user’s home directory, the target server should be of the format %HOMESHARE%%HOMEPATH%. Make sure to have the "Move the contents of Documents to the new location" option checked in the Folder Redirection configuration.
Note You can perform the configuration of the Folder Redirection Group Policy setting through the following path:
User Configuration\Policies\Windows Settings\Folder Redirection\Documents\Properties - Log on to the computer to receive the updated Group Policy settings. This may require the you to log on, log off, and then log on again because the Group Policy settings can be applied asynchronously to the user’s logon.
When the user’s updated Folder Redirection group policy settings are applied, the appropriate content will also have been renamed in the Offline Files cache. Any modifications that were only in the client’s cache will be preserved and synchronized to the new server location when the client performs the first synchronization.
For more information about how to configure the computer after you install the hotfix, follow these steps to achieve the desired behavior described above by scenario 2:
- Log off the computers that access the share folder that is going to be moved or remove the share folder from the source server. This ensures that the shared folder cannot be accessed. This step also ensures that the content on the server can be successfully moved without an error message that the files are in use.
- Backup the content from the source server and restore the content to the target server. The data must be moved in a manner that will preserve file attributes, timestamps and security access. If possible, the old target shared folder should be unshared on the server to prevent the user from synchronizing data changes back to the old location after the data has been moved to the new file server.
Note Moving the data by using a backup application should be sufficient to preserve this file state. However, using a simple copy utility, such as xcopy, will not preserve the file state correctly. - Run a script that calls the RenameItemEx method of the Win32_OfflineFilesCache Class to rename the cached content from the old name to the new name. If this call fails, some content is in use in the cache so it cannot be renamed at this time. The script can then call the RenameItem method of the Win32_OfflineFilesCache Class to schedule a rename of this content in the cache on the next restart.
If a user’s home directory is being moved in this way, please see the following sample script provided to ensure all content is renamed correctly:
'
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
' ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
' THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
' PARTICULAR PURPOSE.
'
' Copyright (c) Microsoft Corporation. All rights reserved.
'
'
' Usage: CscRename.vbs /OldItemPath:<path> /NewItemPath:<path> [/Machine:value] [/User:value] [/Password:value]
'
'
' Demonstrates how to rename an item in the Ofline Files cache.
'
' OldItemPath - UNC path of the current path to be renamed.
'
' NewItemPath - UNC path of the new path to replace the old path.
'
' If NewItemPath already exists, the operation is not performed.
' This operation simply schedules a rename to be performed on the next restart
' of the system.
'
const cComputerName = "LocalHost"
const cWMINamespace = "root\cimv2"
const cWMIClass = "Win32_OfflineFilesCache"
Const wbemFlagReturnImmediately = &h10
nRenameItemExFailureCount = 0
nRenameItemFailureCount = 0
'
' Process commandline arguments
'
strOldItemPath = WScript.Arguments.Named("OldItemPath")'
if Len(strOldItemPath) = 0 Then
Wscript.Echo "OldItemPath parameter required"
Err.Raise 449 ' "argument not optional" error
End if
strNewItemPath = WScript.Arguments.Named("NewItemPath")
if Len(strNewItemPath) = 0 Then
Wscript.Echo "NewItemPath parameter required"
Err.Raise 449 ' "argument not optional" error
End if
strComputerName = WScript.Arguments.Named("Machine")
If Len(strComputerName) = 0 Then strComputerName = cComputerName
strUserID = WScript.Arguments.Named("User")
If Len(strUserID) = 0 Then strUserID = ""
strPassword = WScript.Arguments.Named("Password")
If Len(strPassword) = 0 Then strPassword = ""
set objWMILocator = WScript.CreateObject("WbemScripting.SWbemLocator")
Set objWMIServices = objWMILocator.ConnectServer(strComputerName, _
cWMINameSpace, _
strUserID, _
strPassword)
'
' Note that Win32_OfflineFilesCache is a singleton.
'
strTempOldItemPath = Replace(strOldItemPath,"\","\\")
Set objWMIService = GetObject("winmgmts:\\" & cComputerName & "\root\CIMV2")
Set objCache = objWMIServices.Get("Win32_OfflineFilesCache=@")
'
'Find the path of the item to be renamed in the cache
'
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_OfflineFilesItem WHERE ItemPath ='" &strTempOldItemPath&"'", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
'
'If folder is pinned we need to rename all the directory items underneath this
'
If (objItem.PinInfo.Pinned = True) Then
'
'Find all the directories underneath the folder in the cache
'
Set childItems = objWMIService.ExecQuery("SELECT * FROM Win32_OfflineFilesItem WHERE ParentItemPath = '" &strTempOldItemPath&"'", "WQL", _
wbemFlagForwardOnly + wbemFlagReturnImmediately )
For Each childItem In childItems
strOldPath = childItem.ItemPath
'
'Item to be renamed in the cache
'
strTempNewItemPath = strNewItemPath & "\" & childItem.ItemName
On Error Resume Next
'
' Note that while we pass "False" for the bReplace parameter, that
' parameter is ignored. Existing destinations are never replaced, regardless
' of what we pass for the 3rd parameter.
'
objCache.RenameItemEx strOldPath, strTempNewItemPath, False
hr = Hex(Err.Number)
If Err.Number <> 0 Then
WScript.Echo "RenameItem Failed with error:" &hr
WScript.Echo "While renaming:" & strOldPath & " to:" &strTempNewItemPath
Err.Clear
nRenameItemExFailureCount = nRenameItemExFailureCount + 1
On Error Resume Next
'
'We got the error in renaming this may happen due to item in use, try to renaname after reboot
'
objCache.RenameItem strOldPath, strNewItemPath, False
hr = Hex(Err.Number)
If Err.Number <> 0 Then
WScript.Echo "RenameItem Failed with error:" &hr
WScript.Echo " While renaming:" & strOldPath & " to:" &strTempNewItemPath
Err.Clear
nRenameItemFailureCount = nRenameItemFailureCount + 1
Else
WScript.Echo "item rename scheduled. A restart of the system is necessary to apply the change."
End If
Else
WScript.Echo "Renamed:" &strOldPath & " to:" &strTempNewItemPath & " SUCCESSFULLY"
End If
Next
Else
'
'Find all the directory items underneath the folder in the cache
'
Set childItems = objWMIService.ExecQuery("SELECT * FROM Win32_OfflineFilesItem WHERE ParentItemPath = '" &strTempOldItemPath&"'", "WQL", _
wbemFlagForwardOnly + wbemFlagReturnImmediately )
For Each childItem In childItems
'
'If this item is pinned and a directory, rename it
'
If (childItem.PinInfo.Pinned = True) Then
strOldPath = childItem.ItemPath
strTempNewItemPath = strNewItemPath & "\" &childItem.ItemName
On Error Resume Next
' Note that while we pass "False" for the bReplace parameter, that
' parameter is ignored. Existing destinations are never replaced, regardless
' of what we pass for the 3rd parameter.
'
objCache.RenameItemEx strOldPath, strTempNewItemPath, False
hr = Hex(Err.Number)
If Err.Number <> 0 Then
On Error Resume Next
WScript.Echo "RenameItemEx Failed with error:" &hr
WScript.Echo "While renaming:" & strOldPath & " to:" &strTempNewItemPath
Err.Clear
nRenameItemExFailureCount = nRenameItemExFailureCount + 1
On Error Resume Next
'
'We got the error in renaming this may happen due to item in use, try to renaname after reboot
'
objCache.RenameItem strOldPath, strTempNewItemPath, False
hr = Hex(Err.Number)
If Err.Number <> 0 Then
On Error Resume Next
WScript.Echo "RenameItem Failed with error:" &hr
WScript.Echo "While renaming:" & strOldPath & " to:" &strTempNewItemPath
Err.Clear
nRenameItemFailureCount = nRenameItemExFailureCount + 1
Else
WScript.Echo "item rename scheduled. A restart of the system is necessary to apply the change."
End If
Else
WScript.Echo "Renamed:" &strOldPath & " to:" &strTempNewItemPath & " SUCCESSFULLY"
End If
End If
Next
End If
If (nRenameItemExFailureCount > 0 & (nRenameItemExFailureCount - nRenameItemFailureCount) > 0) Then
WScript.Echo "item rename scheduled. A restart of the system is necessary to apply the change."
ElseIf (nRenameItemExFailureCount = 0) Then
WScript.Echo "Items Renamed SUCCESSFULLY"
Else
WScript.Echo "ItemsRenamed FAILED"
End If
Next
If a file or directory without nested pinned directories (like the user home directory) needs to be renamed, the following script can be used.
'
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
' ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
' THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
' PARTICULAR PURPOSE.
'
' Copyright (c) Microsoft Corporation. All rights reserved.
'
'
' Usage: CscRenameItemEx.vbs /OldItemPath:<path> /NewItemPath:<path> [/Machine:value] [/User:value] [/Password:value]
'
'
' Demonstrates how to rename an item in the Ofline Files cache.
'
' OldItemPath - UNC path of the current path to be renamed.
'
' NewItemPath - UNC path of the new path to replace the old path.
'
' If NewItemPath already exists, the operation is not performed.
' If OldItemPath is currently in use,this operation simply schedules
' a rename to be performed on the next restart.
'
'
On Error Resume Next
const cComputerName = "LocalHost"
const cWMINamespace = "root\cimv2"
const cWMIClass = "Win32_OfflineFilesCache"
'
' Process commandline arguments
'
strOldItemPath = WScript.Arguments.Named("OldItemPath")'
if Len(strOldItemPath) = 0 Then
Wscript.Echo "OldItemPath parameter required"
Err.Raise 449 ' "argument not optional" error
End if
strNewItemPath = WScript.Arguments.Named("NewItemPath")'
if Len(strNewItemPath) = 0 Then
Wscript.Echo "NewItemPath parameter required"
Err.Raise 449 ' "argument not optional" error
End if
strComputerName = WScript.Arguments.Named("Machine")
If Len(strComputerName) = 0 Then strComputerName = cComputerName
strUserID = WScript.Arguments.Named("User")
If Len(strUserID) = 0 Then strUserID = ""
strPassword = WScript.Arguments.Named("Password")
If Len(strPassword) = 0 Then strPassword = ""
set objWMILocator = WScript.CreateObject("WbemScripting.SWbemLocator")
Set objWMIServices = objWMILocator.ConnectServer(strComputerName, _
cWMINameSpace, _
strUserID, _
strPassword)
'
' Note that Win32_OfflineFilesCache is a singleton.
'
' Also note that while we pass "False" for the bReplace parameter, that
' parameter is ignored. Existing destinations are never replaced, regardless
' of what we pass for the 3rd parameter.
'
Set objCache = objWMIServices.Get("Win32_OfflineFilesCache=@")
objCache.RenameItemEx strOldItemPath, strNewItemPath, False
If Err.Number <> 0 Then
WScript.Echo " RenameItemEx Failed:" &Err.Description
Err.Clear
On Error Resume Next
objCache.RenameItem strOldItemPath, strNewItemPath, False
If Err.Number <> 0 Then
WScript.Echo "RenameItem Failed:" &Err.Description
Err.Clear
Else
WScript.Echo "item rename scheduled. A restart of the system is necessary to apply the change."
End If
Else
WScript.Echo "item renamed."
End If
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
976698 You are unable to update the target location of offline file shares in the offline file client side cache without administrative permission
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
Additional file information
Additional file information for Windows 7 and for Windows Server 2008 R2
Additional files for all supported x86-based versions of Windows 7
File name | Update.mum |
File version | Not Applicable |
File size | 17,111 |
Date (UTC) | 12-Feb-2010 |
Time (UTC) | 05:03 |
Platform | Not Applicable |
|
File name | X86_microsoft-windows-o..inefiles-win32-apis_31bf3856ad364e35_6.1.7600.20641_none_abf22f1373799459.manifest |
File version | Not Applicable |
File size | 3,017 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 07:17 |
Platform | Not Applicable |
|
File name | X86_microsoft-windows-o..nefiles-extend-apis_31bf3856ad364e35_6.1.7600.20641_none_8d79f279aea00fda.manifest |
File version | Not Applicable |
File size | 60,347 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 07:27 |
Platform | Not Applicable |
|
File name | X86_microsoft-windows-offlinefiles-core_31bf3856ad364e35_6.1.7600.20641_none_9ecf7e29d63ba47f.manifest |
File version | Not Applicable |
File size | 11,592 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 07:17 |
Platform | Not Applicable |
|
File name | X86_microsoft-windows-offlinefiles-service_31bf3856ad364e35_6.1.7600.20641_none_0a5ac74cdbb49ee3.manifest |
File version | Not Applicable |
File size | 56,703 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 07:24 |
Platform | Not Applicable |
|
File name | X86_microsoft-windows-shell32_31bf3856ad364e35_6.1.7600.20641_none_6cb060208c504828.manifest |
File version | Not Applicable |
File size | 1,059,457 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 07:16 |
Platform | Not Applicable |
|
Additional files for all supported x64-based versions of Windows 7 and of Windows Server 2008 R2
File name | Amd64_microsoft-windows-o..inefiles-win32-apis_31bf3856ad364e35_6.1.7600.20641_none_0810ca972bd7058f.manifest |
File version | Not Applicable |
File size | 3,019 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 19:25 |
Platform | Not Applicable |
|
File name | Amd64_microsoft-windows-o..nefiles-extend-apis_31bf3856ad364e35_6.1.7600.20641_none_e9988dfd66fd8110.manifest |
File version | Not Applicable |
File size | 60,351 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 19:32 |
Platform | Not Applicable |
|
File name | Amd64_microsoft-windows-offlinefiles-core_31bf3856ad364e35_6.1.7600.20641_none_faee19ad8e9915b5.manifest |
File version | Not Applicable |
File size | 11,596 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 19:25 |
Platform | Not Applicable |
|
File name | Amd64_microsoft-windows-offlinefiles-service_31bf3856ad364e35_6.1.7600.20641_none_667962d094121019.manifest |
File version | Not Applicable |
File size | 56,710 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 19:30 |
Platform | Not Applicable |
|
File name | Amd64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7600.20641_none_c8cefba444adb95e.manifest |
File version | Not Applicable |
File size | 1,058,443 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 19:25 |
Platform | Not Applicable |
|
File name | Update.mum |
File version | Not Applicable |
File size | 25,908 |
Date (UTC) | 12-Feb-2010 |
Time (UTC) | 05:03 |
Platform | Not Applicable |
|
File name | Wow64_microsoft-windows-o..nefiles-extend-apis_31bf3856ad364e35_6.1.7600.20641_none_f3ed384f9b5e430b.manifest |
File version | Not Applicable |
File size | 60,349 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 07:10 |
Platform | Not Applicable |
|
File name | Wow64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7600.20641_none_d323a5f6790e7b59.manifest |
File version | Not Applicable |
File size | 1,054,916 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 07:09 |
Platform | Not Applicable |
|
File name | X86_microsoft-windows-o..inefiles-win32-apis_31bf3856ad364e35_6.1.7600.20641_none_abf22f1373799459.manifest |
File version | Not Applicable |
File size | 3,017 |
Date (UTC) | 11-Feb-2010 |
Time (UTC) | 07:17 |
Platform | Not Applicable |
|
File name | |
Additional files for all supported IA-64-based versions of Windows Server 2008 R2
File name | Ia64_microsoft-windows-o..inefiles-win32-apis_31bf3856ad364e35_6.1.7600.20636_none_ac03a467736b0017.manifest |
File version | Not Applicable |
File size | 3,018 |
Date (UTC) | 05-Feb-2010 |
Time (UTC) | 08:00 |
Platform | Not Applicable |
|
File name | Ia64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7600.20636_none_6cc1d5748c41b3e6.manifest |
File version | Not Applicable |
File size | 1,058,441 |
Date (UTC) | 05-Feb-2010 |
Time (UTC) | 08:01 |
Platform | Not Applicable |
|
File name | Update.mum |
File version | Not Applicable |
File size | 4,856 |
Date (UTC) | 06-Feb-2010 |
Time (UTC) | 01:13 |
Platform | Not Applicable |
|
File name | Wow64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7600.20636_none_d33377547901de1b.manifest |
File version | Not Applicable |
File size | 1,054,916 |
Date (UTC) | 05-Feb-2010 |
Time (UTC) | 07:19 |
Platform | Not Applicable |
|
File name | X86_microsoft-windows-o..inefiles-win32-apis_31bf3856ad364e35_6.1.7600.20636_none_ac020071736cf71b.manifest |
File version | Not Applicable |
File size | 3,017 |
Date (UTC) | 05-Feb-2010 |
Time (UTC) | 07:24 |
Platform | Not Applicable |
|
File name | |