?? Windows 7 ??? ?? Windows Server 2008 R2 ??? ?????????? ?????? ?? ???? ??????? ????? ??????? ???? ??? ??? ??????? ????? ???? ?????? ????? ?????? ???? ??? ????? ???

???? ?????? ???? ??????
???? ID: 977229 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

?????

?? ???????? ?? ????? ????:

???????? 1
  • His/her ????????? ???? ????? ????? ?? ?????????????? ???? ?? ??? ?????????? ?? ??? ??????? ????????????? ?????? ????? ???
  • ???? Windows Server 2008 R2 ?? Windows 7 ??? ??? ???????? ?? ??????? ??????? ?????? ????? ???
  • ?? ???? ?? ????? ?? ?????????????? ?????????? ??????????? ?? ??? ?????? ????? ????? ????? ????????? ????? ?? ???? ???? ????? ??????? ????? ?? ?? ????? ????? ????? ?? ???????????? ???? ??, ?? ?? ?????????? ???? ?????? ????? ????? ????? ?? ?? ????? ????? ????? ?? ???

    ??? ???? ????? ????? ??? ???? ???? DFS ??? ?? ?????? ?? ?????? ???? ?? ???? ?? ??? ?? ??????? ?????????????? ????????? ????? ??? ??? ??, ?? ?? ????? ?????
  • ?????????? ?? ???????? ?? ?????? ??????? ????????????? ???? ???? ???? ???, ?? ?? ?? ???? ??????????? ?? ??? ?? ???? ????? ??? ?? ??????????? ???? ?? ??? ???? ??? ???? ?? ???? ?? ??? ??????? ????? ??? ??? ???? ?? ?? ?? ?? ???? ????? ??? ?????? ????? ?? ????? ????? ?? ??????? ?? ??? ?????.
?? ???????? ???, ?? ??????? ??????? ????????????? ???? ?????? ?? ??????? ????? ??? ???? ?? ??? ????? ?? ??? ?? ??? ?? ????????? ?? ?????? ???? ?? ???? ???? ?????????? ???????????? ?? ???? ??? ?? ??????? ?? ?????? ???????? ??????? ???????? ????? ???? ???? ???????????? ????????????? ???? ?????????? ?? ??? ???? ??, ?? ?? ??????? ????? ??? ???? ?? ??? ????? ?????? ???? ??? ???????, Windows XP ??? ?? ???????????? ????????????? ?? ???? ???????????? ?? ??? ???? ?? ?????

???????? 2
  • ??? ?? ??? ????? ????? ??????? ?? ????? ????????? ?? ??????? ??????? ???? ???? ?? ?????? ?? ?????????? ?? ??? ??????? ????? ??? ??? Windows Server 2008 R2 ?? Windows 7 ??? ??? ???????? ?? ????
  • ??????? ???? ????? ????? ????? ?? ???? ???? DFS ????? ?? ?? ?? ??? ???????? ??????? ???? ?? ??? ?? ?????? ?? ?????? ?? ??????
  • ??? ?? ????? ??? ?? ?????????? re ???? ?? ???? ?? ??? ???? ?? ???????? ?? ???? ???? ??? ???? ?? ??? ???? ???? ?? ???-??? ?? ?? ????? ????? ???
?? ???????? ???, ???? ??????? ??????? ????? ??? ?? ??? ????? ??? ?????????? ???????? ?? ???????????? ????????????? ?? ??? ???? ??, ?? ?? ?????? ??????? ???? ?? ??? ??????? ???????? ?? ???????? ?? ???????? ???? ????????? ???? ?? ????? ???????, Windows XP ??? ?? ??? ?? ??? ??? ????? ?????????-???????????? ?????????? ???????? ???????? ?? ???????? ?? ???? ??? ?? ????

????????

?? ?????? ?? ?? ???? ?? ???, ???????? ???????? ?? ????? ???????? ???????? ???? ???????? ?? ??????? ???? ?? ???, ???? ???????????? ????????????? ?? ???? CSC ??? ??? ???? ??? ?? ??????? ??????? ?????? ?? ???? ????

???: ?? ???????? ????? ???? ??????????? ?? ????? ???? ?? ??? ????????? ?? ?????? ?? ??? Windows 7 SP1 ?? Windows Server 2008 R2 ??? ????? ???? ??? ??, ??????? ??? ?? ???? RenameItemEx ?? ??? ???? SP1 ??? ?????? ????? ?? ??? ???????? ???????? ?? ??????? ???? ?? ???????? ????:
 
2610379 ????? ?????????? Windows 7 ?? Windows Server 2008 R2 ??? ??? ??????? ??? ?? ??? ?????????????? ??????? ??? ???? ??, ?? ??????? ????????????? ???? ??? ???? ????

???????? ???????

?? ??????? ???????? Microsoft ?? ?????? ??? ???????, ?? ???????? ???? ?? ???? ??? ???? ?? ?????? ?? ?? ???? ?? ??? ?????? ??? ?? ???????? ????? ?? ???? ??? ?????? ?????? ?? ????? ?? ??? ??? ???? ????? ???????? ?? ???? ???? ???? ?? ????????? ???? ???????? ??????? ??????? ?? ???? ??? ??? ?? ?? ?????? ?? ???? ??? ???????? ???? ???, ?????, ?? ?? ????????? ???? ?????? ?? ???????? ????? ???? ?????????? ?????? ?? ??? ??????

???????? ??????? ?? ??? ?????? ??, ?? ?? "???????? ??????? ?????? ??" ??? ?? ????? ??? ???? ?? ????? ?? ??? ??? ?? ??? ???? ????? ??, ?? ???????? ??????? ???? ?? ??? Microsoft ?????? ???? ?? ?????? ?? ?????? ?????

??? ??? ???????? ???????? ??????? ???? ?? ???? ?? ?????? ?????? ?????? ??, ?? ???? ?? ??? ???? ?????? ????? ??? ???? ??? ???????? ?????? ???????? ?? ?? ???????? ?? ??? ?? ?? ??????? ???????? ?? ????? ???? ??????? ?????? ????? ???? ?????? ???? ???? Microsoft ?????? ???? ?? ?????? ???????? ?????? ?? ?? ?? ??? ???? ?????? ????? ?? ???, ????? Microsoft ??? ???? ?? ????:
http://support.microsoft.com/contactus/?ws=support
??? "???????? ??????? ?????? ??" ?????? ????? ??? ????????? ?????? ?????? ????????? ???? ??? ??? ???? ???? ???? ? ????, ?? ?? ???????? ?? ???? ?? ??? ?????? ???? ??, ??????? ?? ???

??????????

?? ???????? ?? ???? ???? ?? ???, ??? ?? Windows 7 ?? Windows Server 2008 R2 ????? ?????? ???

????????? ???????

???
  • ?? ??????? ????????????? ?????? ?? ????? ???? ???, ?? ?? ????? ??? ??? ???????? ???? ???? ?? ??? ????? ????????? ????? ??????
  • ???????? ???? ????????? ?? ???, ?? ????? ????????? ?? ????? ?? ???? ???? ????? ????????? RenameItemEx ?? ??? ???? Win32_OfflineFilesCache ???? ?? ????? ???? ??? Win32_OfflineFilesCache ???? ?? ???? ??? ???? ??????? ?? ???, ????? ??? ???? ?? ????:http://msdn.microsoft.com/en-us/library/bb309182 (VS.85). aspx
?????????? ?? ??????, ??????, ?? ????? ?? ?? ????????? ?? ??????? ???? ????? ??? ???? ???????, ??? ?? ????????? ?? ??? ????? ?? ??????? ????? ???????? ?? ???? ??? ?????, ????????? ???? ?? ?? ?? ????? ?? ??????? ?? ???? ????? ???? ???? ?? ?? ??? ??????? ????? ?? ??????? ?? ???, ????????? ????? ???? ??? ?????? ??? ??, ?? ???? ???, ?? ????????? ?? ???????????? ?? ???? ???? ??? ?? ???? ?? ????????? ?? ???????????? ???? ???? ?? ???? ??? ???? ??????? ?? ??? Microsoft ?????? ??? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????:
322756 ??? ?? ???? ?? Windows ??? ????????? ?? ???????????? ???? ????
?? ????? ??? ???????? ?? ????? ???? ?? ???, ???? ?? ????????? ????? ????? ????? ??? ???? ?? ???, ????? ????? ?? ???? ????:
  1. ????????? ?????? ???, ????? ????????? ??????? ?? ?????? ?????:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
  2. ?? ??????? ??????????? ????????? ???????, ????? ???? ??????? ????, ????? ???? ???, ????? ???? DWORD ??? ??, ?????? FolderRedirectionEnableCacheRename, ?? ???? ??? ENTER ??????
  3. ????? ??? FolderRedirectionEnableCacheRename ????????? ????????? ?? 1 ?? ??? ?????
  4. ????????? ?????? ?? ???? ???????

???????? ??????????

?? ???????? ?? ???? ???? ?? ??? ???? ???????? ?? ???????? ???? ?????

???????? ??????????? ???????

?? ???????? ?? ???? ?????? ?? ???? ???????? ?? ???????????? ?????

????? ???????

?? ???????? ?? ??????? ??????? ?? ????? ?????? ??? ???????? ??? ????????? ??????? ??????? ???? ??? ?????? ?? ??? ?? ??????? ?? ??? ??????? ????????? ??? (UTC) ??? ???????? ???? ?????? ?? ??? ???? ??????? ???????? ?? ?? ??????? ?? ??? ???? ??????? ?????? ??? ??? (DST) ???? ?? ??? ???? ??????? ??? ??? ????????? ???? ???? ?? ?? ??????? ?? ??????? ??????????? ????????? ???? ??? ?? ???? ??? ??, ?????? ?? ??? ??? ???? ????
Windows 7 ?? Windows Server 2008 R2 ????? ??????? ???
?????????? Windows 7 ?????????? ?? Windows Server 2008 R2 ?????????? ?? ?? ????? ??? ????? ???? ???????, ???????? ????? ???????? ?????? ?? ??? ???????? ?????? ????? ?? ???????? ???? ???? ?? ?? ????? ???????? ?????? ?? ???? ???? ???? ????????? ????? ?? ?????? ???? ?? ???, ????? ?? "Windows 7/Windows ????? 2008 R2" ?? ??????? ???????? ???????? ?? ??? ????? ?? ????????? ???? ?? ??? ???? ??? ????? "????" ??? ?? ??? ???????? ???????? ?????? ?? ???????? ???? ???? ???
  • ?????????? ??????? (.manifest) ?? ??????? ????? ??????? (. mum) ???????? ?????? ?? ??? ???-??? ???????? "???????? ????? ??????? Windows Server 2008 R2 ?? Windows 7 ?? ???" ?????? ???? ????? ?? ?????????? ?????, ?? ??????? ??????? ?????? (. cat) ???????, ????? ??????? ??? ?? ?????? ???? ???? ?? ??? ?????????? ???? ????? ??? ????????? ???????? ???? ???, ??????? ?????? ???????, Microsoft ??????? ????????? ?? ??? ??????????? ????
Windows 7 ?? ??? ??????? x86-?????? ????????? ?? ???
?? ?????? ?? ??????? ?????? ?????? ?? ??????? ????
????? ?? ???????? ???????????? ?? ????????????????????????
Cscapi.dll6.1.7600.2064134,81611-Feb-201006: 54x 86
Cscdll.dll6.1.7600.2064123,04011-Feb-201006: 54x 86
Cscobj.dll6.1.7600.20641138,75211-Feb-201006: 54x 86
Offlinefileswmiprovider.mof???? ??? ????14,56810-Feb-201023: 45???? ??? ????
Offlinefileswmiprovider_uninstall.mof???? ??? ????14,56810-Feb-201023: 45???? ??? ????
Csc.sys6.1.7600.20641387,58411-Feb-201003: 17x 86
Cscmig.dll6.1.7600.20641109,56811-Feb-201006: 54x 86
Microsoft-windows-offlinefiles-core-ppdlic.xrm-ms???? ??? ????3,14411-Feb-201007: 04???? ??? ????
Cscsvc.dll6.1.7600.20641546,30411-Feb-201006: 54x 86
Microsoft-windows-offlinefiles.mof???? ??? ????1,77613-Jul-200920: 25???? ??? ????
Apps.inf???? ??? ????62,33411-Feb-201003: 10???? ??? ????
Shell32. dll6.1.7600.2064112,868,09611-Feb-201006: 54x 86
Windows 7 ?? Windows Server 2008 R2 ?? ??? ??????? x64-?????? ????????? ?? ???
?? ?????? ?? ??????? ?????? ?????? ?? ??????? ????
????? ?? ???????? ???????????? ?? ????????????????????????
Cscapi.dll6.1.7600.2064146,08011-Feb-201007: 35x 64
Cscdll.dll6.1.7600.2064130,20811-Feb-201007: 35x 64
Cscobj.dll6.1.7600.20641240,12811-Feb-201007: 35x 64
Offlinefileswmiprovider.mof???? ??? ????14,56810-Feb-201023: 45???? ??? ????
Offlinefileswmiprovider_uninstall.mof???? ??? ????14,56810-Feb-201023: 45???? ??? ????
Csc.sys6.1.7600.20641514,04811-Feb-201003: 29x 64
Cscmig.dll6.1.7600.20641137,21611-Feb-201007: 35x 64
Microsoft-windows-offlinefiles-core-ppdlic.xrm-ms???? ??? ????3,14411-Feb-201007: 49???? ??? ????
Cscsvc.dll6.1.7600.20641692,22411-Feb-201007: 35x 64
Microsoft-windows-offlinefiles.mof???? ??? ????1,77613-Jul-200920: 20???? ??? ????
Apps.inf???? ??? ????62,33411-Feb-201003: 20???? ??? ????
Shell32. dll6.1.7600.2064114,164,99211-Feb-201007: 41x 64
Cscobj.dll6.1.7600.20641138,75211-Feb-201006: 54x 86
Offlinefileswmiprovider.mof???? ??? ????14,56810-Feb-201023: 45???? ??? ????
Offlinefileswmiprovider_uninstall.mof???? ??? ????14,56810-Feb-201023: 45???? ??? ????
Shell32. dll6.1.7600.2064112,868,09611-Feb-201006: 54x 86
Cscapi.dll6.1.7600.2064134,81611-Feb-201006: 54x 86
Cscdll.dll6.1.7600.2064123,04011-Feb-201006: 54x 86
??? ??????? IA-x64-?????? ????????? ?? Windows Server 2008 R2 ?? ???
?? ?????? ?? ??????? ?????? ?????? ?? ??????? ????
????? ?? ???????? ???????????? ?? ????????????????????????
Cscapi.dll6.1.7600.2063691,13605-Feb-201006: 18IA-64
Cscdll.dll6.1.7600.2063668,60805-Feb-201006: 18IA-64
Apps.inf???? ??? ????62,33405-Feb-201002: 45???? ??? ????
Shell32. dll6.1.7600.2063621,173,76005-Feb-201006: 24IA-64
Shell32. dll6.1.7600.2063612,868,09605-Feb-201007: 04x 86
Cscapi.dll6.1.7600.2063634,81605-Feb-201007: 04x 86
Cscdll.dll6.1.7600.2063623,04005-Feb-201007: 04x 86

??????

Microsoft ?? ?????? ?? ?? ?? "?? ?? ????" ???? ??? ???????? Microsoft ???????? ??? ?? ?????? ?? ???

???? ???????

???? ???????? ?? ??????? ???? ?? ??? ???????? ?? ????????? ???? ???? ?? ???? ??? ???? ??????? ?? ???, ?????? ???????? 1 ?? ??? ?????? ??????? ??????? ???? ?? ???, ????? ????? ?? ???? ????:
  1. "????????? ???????" ??? ?????? ??? ??? ?????? ????????? ????? ??? ???

    ??? ????? ?????????? ?? ????????? ????????? ??? ??, ?? ?????? ???????????? ?? ??? ?? ??????? ???????? ?? ????? ???? ???, ?? ????? ?? ????????? ?????? ???? ?? ?????????? ????? ????? ??????? ?? ????? ?? ???? ?? ??? ???? ?? ??? ??? ???? ???? ??????
  2. ??? ?? ???????? ?? ?? ????, ?? ???? ??????? ????? ????? ?? ??????? ?? ??? ???? ?? ??? ???? ??????? ?? ?????? ?? ????????? ???? ?? ?? ???? ??????? ?????? ???? ???? ?? ????? ????????? ???? ?? ?? ??? ?? ????? ?? ??????? ??????????? ??????? ????? ??? ??? ?? ?????? ????? ?? ???? ?? ?? ???? ??? ?? ???
  3. ????? ????? ????? ?? ??????? ?? ??????? ?? ?????? ????? ?? ???????????? ????? ???? ????? ?????????, ????? ????? ?? ????? ??? ?? ???? ???? ????? ??? ??? ?????? ?? ??????? ?????? ??? ???? ??, ?????? ?????? ???? ??????? ?????????? ???? ?? ?? ????? ????? ?? ?? ???? ??? ?? ?? ??? ???? ?????? ????? ?? ???? ???????? ??????????? ???? ?? ????? ?? ??? ????? ?? ???????? ???? ??????

    ??? ??? ????? ????????? ?? ????? ???? ???? ?? ?? ????? ?????? ?? ????? ?? ??? ???????? ???? ?????? ???????, xcopy, ???? ?? ?????? ????? ?????? ?? ????? ?? ????? ?????? ??? ?? ???????? ???? ?????
  4. ?????? ????? ?? ??????????? ???? ?? ??? ??????? ????????????? ???????????? ?? ?????? ????? ??? ?? ?????????? ?? ??? ?????????? ???? ?? ???, ?????? ????? ?? ?????????????? ???? ?????? % HOMESHARE ?? ???? ????? ?????? ?? ???, % % HOMEPATH %? ??? ??????? ????????????? ???????????? ????? "????????? ?? ??????? ?? ?? ????? ?? ?? ????" ?????? ???? ?? ??? ????????? ?????

    ??? ?? ??????? ????????????? ???? ???? ?????? ????? ?? ?? ?????? ?? ?? ???????????? ?? ???? ???:

    ?????????? Configuration\Policies\Windows Settings\Folder Redirection\Documents\Properties
  5. ?????? ??? ?? ???? ???? ?????? ??????? ???? ?? ??? ???????? ?? ??? ?? ????? ?? ?? ??? ??, ??? ??? ????, ?? ?????????? ?? ??? ?? ???? ?? ??? ???? ???? ???????? ??????????? ??? ??? ???? ???? ?? ???? ??????? ???? ??? ???: ??? ?? ???? ?? ??? ???? ??? ???? ???
?????????? ?????? ??????? ????????????? ???? ???? ???????? ???? ???? ???, ?? ??????? ??????? ?? ??????? ????? ??? ??? ???? ??? ?? ?????? ???? ??????? ??? ??? ??? ?? ??? ?? ?????? ???????? ?? ????? ?? ????? ?????????????? ??????? ???? ??, ?? ?? ????? ????? ?? ??????????? ???

???? ???????? ?? ??????? ???? ?? ??? ???????? ?? ????????? ???? ???? ?? ???? ??? ???? ??????? ?? ???, ?????? ???????? 2 ?? ??? ?????? ??????? ??????? ???? ?? ???, ????? ????? ?? ???? ????:
  1. ??? ?? ???????? ?? ?? ????, ?? ???? ??????? ????? ????? ?? ??????? ?? ??? ???? ?? ??? ???? ??????? ?? ?????? ?? ????????? ???? ?? ?? ???? ??????? ?????? ???? ???? ?? ????? ????????? ???? ?? ?? ??? ?? ????? ?? ??????? ??????????? ??????? ????? ??? ??? ?? ?????? ????? ?? ???? ?? ?? ???? ??? ?? ???
  2. ????? ????? ????? ?? ??????? ?? ??????? ?? ?????? ????? ?? ???????????? ????? ???? ????? ?????????, ????? ????? ?? ????? ??? ?? ???? ???? ????? ??? ??? ?????? ?? ??????? ?????? ??? ???? ??, ?????? ?????? ???? ??????? ?????????? ???? ?? ?? ????? ????? ?? ?? ???? ??? ?? ?? ??? ???? ?????? ????? ?? ???? ???????? ??????????? ???? ?? ????? ?? ??? ????? ?? ???????? ???? ??????

    ??? ??? ????? ????????? ?? ????? ???? ???? ?? ?? ????? ?????? ?? ????? ?? ??? ???????? ???? ?????? ???????, xcopy, ???? ?? ?????? ????? ?????? ?? ????? ?? ????? ?????? ??? ?? ???????? ???? ?????
  3. ?? ??? ?? ??? ?????? ??? ?? ??? ?? ?? ??????? ?? ??? ????? ?? ??? Win32_OfflineFilesCache ???? ?? RenameItemEx ???? ??? ?? ????????? ?????? ?? ??? ???? ???? ??, ?? ?? ??? ?? ???? ?? ????, ????? ??? ??????? ??? ??? ????? ??? ??? ????????? ??? ???? ???????? ?? ??? ??? ?? ??????? ?? ??? ????? ?? ??????? ???? ?? ??? Win32_OfflineFilesCache ???? ?? RenameItem ???? ??? ?? ???? ????
???? ?????????? ?? ??? ?????????? ??? ?? ??? ?? ?? ???? ?? ??? ??, ?? ????? ????? ????????? ?????? ??? ?? ??? ??????? ??? ?? ??? ???? ??? ??, ?? ????????? ???? ?? ??? ????? ?????:
'
' 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
???? ????? ?? ?????????? ??????? ??? ???? ??? ?????????? (???? ?????????? ??? ??????????) ?? ???? ???? ?? ???? ?? ???????? ??, ?? ????? ????????? ???? ?? ?????
'
' 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

???? ??????? ?? ??? Microsoft ?????? ??? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????:
976698???? ?????????? ?????? ?? ???? ??????? ????? ??????? ???? ??? ??? ??????? ????? ???? ?????? ????? ?? ?????? ???? ??? ?????? ??? ???
?????????? ?????? ?????? ?? ???? ??? ???? ??????? ?? ??? Microsoft ?????? ??? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????:
824684Microsoft ?????????? ???????? ?? ????? ???? ??? ???????? ???? ???? ???? ?????? ?? ?????

???????? ????? ???????

Windows 7 ?? Windows Server 2008 R2 ?? ??? ???????? ????? ???????

Windows 7 ?? ??? ??????? x86-?????? ????????? ?? ??? ???????? ???????
?? ?????? ?? ??????? ?????? ?????? ?? ??????? ????
????? ?? ???Update.mum
????? ??????????? ??? ????
????? ?? ????17,111
?????? (UTC)12-Feb-2010
??? (UTC)05: 03
??????????????? ??? ????
????? ?? ???X86_microsoft-windows-?.inefiles-win32-apis_31bf3856ad364e35_6.1.7600.20641_none_abf22f1373799459.manifest
????? ??????????? ??? ????
????? ?? ????3,017
?????? (UTC)11-Feb-2010
??? (UTC)07: 17
??????????????? ??? ????
????? ?? ???X86_microsoft-windows-?.nefiles-???????-apis_31bf3856ad364e35_6.1.7600.20641_none_8d79f279aea00fda.manifest
????? ??????????? ??? ????
????? ?? ????60,347
?????? (UTC)11-Feb-2010
??? (UTC)07: 27
??????????????? ??? ????
????? ?? ???X86_microsoft-windows-offlinefiles-core_31bf3856ad364e35_6.1.7600.20641_none_9ecf7e29d63ba47f.manifest
????? ??????????? ??? ????
????? ?? ????11,592
?????? (UTC)11-Feb-2010
??? (UTC)07: 17
??????????????? ??? ????
????? ?? ???X86_microsoft-windows-offlinefiles-service_31bf3856ad364e35_6.1.7600.20641_none_0a5ac74cdbb49ee3.manifest
????? ??????????? ??? ????
????? ?? ????56,703
?????? (UTC)11-Feb-2010
??? (UTC)07: 24
??????????????? ??? ????
????? ?? ???X86_microsoft-windows-shell32_31bf3856ad364e35_6.1.7600.20641_none_6cb060208c504828.manifest
????? ??????????? ??? ????
????? ?? ????1,059,457
?????? (UTC)11-Feb-2010
??? (UTC)07: 16
??????????????? ??? ????
Windows 7 ?? Windows Server 2008 R2 ?? ??? ??????? x64-?????? ????????? ?? ??? ???????? ???????
?? ?????? ?? ??????? ?????? ?????? ?? ??????? ????
????? ?? ???Amd64_microsoft-windows-?.inefiles-win32-apis_31bf3856ad364e35_6.1.7600.20641_none_0810ca972bd7058f.manifest
????? ??????????? ??? ????
????? ?? ????3,019
?????? (UTC)11-Feb-2010
??? (UTC)19: 25
??????????????? ??? ????
????? ?? ???Amd64_microsoft-windows-?.nefiles-???????-apis_31bf3856ad364e35_6.1.7600.20641_none_e9988dfd66fd8110.manifest
????? ??????????? ??? ????
????? ?? ????60,351
?????? (UTC)11-Feb-2010
??? (UTC)19: 32
??????????????? ??? ????
????? ?? ???Amd64_microsoft-windows-offlinefiles-core_31bf3856ad364e35_6.1.7600.20641_none_faee19ad8e9915b5.manifest
????? ??????????? ??? ????
????? ?? ????11,596
?????? (UTC)11-Feb-2010
??? (UTC)19: 25
??????????????? ??? ????
????? ?? ???Amd64_microsoft-windows-offlinefiles-service_31bf3856ad364e35_6.1.7600.20641_none_667962d094121019.manifest
????? ??????????? ??? ????
????? ?? ????56,710
?????? (UTC)11-Feb-2010
??? (UTC)19: 30
??????????????? ??? ????
????? ?? ???Amd64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7600.20641_none_c8cefba444adb95e.manifest
????? ??????????? ??? ????
????? ?? ????1,058,443
?????? (UTC)11-Feb-2010
??? (UTC)19: 25
??????????????? ??? ????
????? ?? ???Update.mum
????? ??????????? ??? ????
????? ?? ????25,908
?????? (UTC)12-Feb-2010
??? (UTC)05: 03
??????????????? ??? ????
????? ?? ???Wow64_microsoft-windows-?.nefiles-???????-apis_31bf3856ad364e35_6.1.7600.20641_none_f3ed384f9b5e430b.manifest
????? ??????????? ??? ????
????? ?? ????60,349
?????? (UTC)11-Feb-2010
??? (UTC)07: 10
??????????????? ??? ????
????? ?? ???Wow64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7600.20641_none_d323a5f6790e7b59.manifest
????? ??????????? ??? ????
????? ?? ????1,054,916
?????? (UTC)11-Feb-2010
??? (UTC)07: 09
??????????????? ??? ????
????? ?? ???X86_microsoft-windows-?.inefiles-win32-apis_31bf3856ad364e35_6.1.7600.20641_none_abf22f1373799459.manifest
????? ??????????? ??? ????
????? ?? ????3,017
?????? (UTC)11-Feb-2010
??? (UTC)07: 17
??????????????? ??? ????
????? ?? ???
??? ??????? IA-x64-?????? ????????? ?? Windows Server 2008 R2 ?? ??? ???????? ???????
?? ?????? ?? ??????? ?????? ?????? ?? ??????? ????
????? ?? ???Ia64_microsoft-windows-?.inefiles-win32-apis_31bf3856ad364e35_6.1.7600.20636_none_ac03a467736b0017.manifest
????? ??????????? ??? ????
????? ?? ????3,018
?????? (UTC)05-Feb-2010
??? (UTC)08: 00
??????????????? ??? ????
????? ?? ???Ia64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7600.20636_none_6cc1d5748c41b3e6.manifest
????? ??????????? ??? ????
????? ?? ????1,058,441
?????? (UTC)05-Feb-2010
??? (UTC)08: 01
??????????????? ??? ????
????? ?? ???Update.mum
????? ??????????? ??? ????
????? ?? ????4,856
?????? (UTC)06-Feb-2010
??? (UTC)01: 13
??????????????? ??? ????
????? ?? ???Wow64_microsoft-windows-shell32_31bf3856ad364e35_6.1.7600.20636_none_d33377547901de1b.manifest
????? ??????????? ??? ????
????? ?? ????1,054,916
?????? (UTC)05-Feb-2010
??? (UTC)07: 19
??????????????? ??? ????
????? ?? ???X86_microsoft-windows-?.inefiles-win32-apis_31bf3856ad364e35_6.1.7600.20636_none_ac020071736cf71b.manifest
????? ??????????? ??? ????
????? ?? ????3,017
?????? (UTC)05-Feb-2010
??? (UTC)07: 24
??????????????? ??? ????
????? ?? ???

???

???? ID: 977229 - ????? ???????: 19 ?????? 2012 - ??????: 1.0
???? ???? ???? ??:
  • Windows Server 2008 R2 Standard
  • Windows Server 2008 R2 Enterprise
  • Windows Server 2008 R2 Datacenter
  • Windows Server 2008 R2 Foundation
  • Windows 7 Enterprise
  • Windows 7 Professional
  • Windows 7 Ultimate
??????: 
kbprb kbsurveynew kbexpertiseadvanced kbhotfixserver kbautohotfix kbqfe kbfix kbmt KB977229 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:977229

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com