파일 및 설정 포함

마이그레이션 .xml 파일이 지정되면 USMT(사용자 상태 마이그레이션 도구)는 USMT 마이그레이션에 지정된 설정 및 구성 요소를 마이그레이션합니다. 추가 파일 및 설정을 포함하려면 사용자 지정 .xml 파일을 만든 다음, 및 LoadState.exe 명령을 모두 ScanState.exe 사용할 때 이 파일을 포함하는 것이 좋습니다. 사용자 지정 .xml 파일을 만들면 변경 내용을 기본 .xml 파일과 별도로 유지할 수 있습니다. 사용자 지정 .xml 파일을 만들면 수정 내용을 더 쉽게 추적할 수 있습니다.

단일 레지스트리 키 마이그레이션

다음 .xml 파일은 단일 레지스트리 키를 마이그레이션합니다.

<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
     <component type="Application" context="System">
          <displayName>Component to migrate only registry value string</displayName> 
          <role role="Settings">
          <rules>
               <include>
                    <objectSet>
                         <pattern type="Registry">HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache [Persistent]</pattern> 
                    </objectSet>
               </include>
          </rules>
          </role>
     </component>
</migration>

특정 폴더 마이그레이션

다음 예제에서는 특정 드라이브 및 컴퓨터의 모든 위치에서 폴더를 마이그레이션하는 방법을 보여 줍니다.

특정 드라이브에서 폴더 마이그레이션

  • 하위 폴더 포함 다음 .xml 파일은 모든 파일 및 하위 폴더를 대상 컴퓨터로 C:\EngineeringDrafts 마이그레이션합니다.

    <migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
    <component type="Documents" context="System">
      <displayName>Component to migrate all Engineering Drafts Documents including subfolders</displayName>
      <role role="Data">
        <rules>
          <include>
            <objectSet>
              <pattern type="File">C:\EngineeringDrafts\* [*]</pattern>
            </objectSet>
          </include>
        </rules>
      </role>
    </component>
    </migration>
    
  • 하위 폴더 제외. 다음 .xml 파일은 에서 C:\EngineeringDrafts모든 파일을 마이그레이션하지만 내 C:\EngineeringDrafts의 하위 폴더는 마이그레이션하지 않습니다.

    <migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
    <component type="Documents" context="System">
      <displayName>Component to migrate all Engineering Drafts Documents without subfolders</displayName>
      <role role="Data">
        <rules>
          <include>
            <objectSet>
              <pattern type="File"> C:\EngineeringDrafts\ [*]</pattern>
            </objectSet>
          </include>
        </rules>
      </role>
    </component>
    </migration>
    

모든 위치에서 폴더 마이그레이션

다음 .xml 파일은 컴퓨터의 모든 드라이브에서 폴더의 EngineeringDrafts 모든 파일 및 하위 폴더를 마이그레이션합니다. 이름이 같은 여러 폴더가 있는 경우 이 이름의 모든 파일이 마이그레이션됩니다.

<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
  <displayName>Component to migrate all Engineering Drafts Documents folder on any drive on the computer </displayName>
  <role role="Data">
    <rules>
         <include>
            <objectSet>
         <script>MigXmlHelper.GenerateDrivePatterns ("\EngineeringDrafts\* [*] ", "Fixed")</script>            
         <script>MigXmlHelper.GenerateDrivePatterns ("*\EngineeringDrafts\* [*] ", "Fixed")</script>            
       </objectSet>
          </include>
    </rules>
  </role>
</component>
</migration>

다음 .xml 파일은 드라이브의 모든 위치에서 폴더의 EngineeringDrafts 모든 파일과 하위 폴더를 C:\ 마이그레이션합니다. 이름이 같은 여러 폴더가 있는 경우 모두 마이그레이션됩니다.

<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
  <displayName>Component to migrate all Engineering Drafts Documents EngineeringDrafts folder from where ever it exists on the C: drive </displayName>
  <role role="Data">
    <rules>
         <include>
            <objectSet>                 
<pattern type="File"> C:\*\EngineeringDrafts\* [*]</pattern>
<pattern type="File"> C:\EngineeringDrafts\* [*]</pattern>
       </objectSet>
          </include>
    </rules>
  </role>
</component>
</migration>

파일 형식을 특정 폴더로 마이그레이션

다음 .xml 파일은 원본 컴퓨터의 지정된 드라이브에 있는 파일을 대상 컴퓨터의 C:\Music 폴더로 마이그레이션 .mp3 합니다.

<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
  <displayName>All .mp3 files to the Documents folder</displayName>
  <role role="Data">
    <rules>
      <include>
        <objectSet>
          <script>MigXmlHelper.GenerateDrivePatterns ("* [*.mp3]", "Fixed")</script>
        </objectSet>
      </include>
      <!-- Migrates all the .mp3 files in the store to the C:\Music folder during LoadState -->
      <locationModify script="MigXmlHelper.Move('C:\Music')">
        <objectSet>
          <script>MigXmlHelper.GenerateDrivePatterns ("* [*.mp3]", "Fixed")</script>
        </objectSet>
      </locationModify>
    </rules>
  </role>
</component>
</migration> 

특정 파일 마이그레이션

다음 예제에서는 특정 폴더에서 파일을 마이그레이션하는 방법과 모든 위치에서 파일을 마이그레이션하는 방법을 보여 줍니다.

  • 폴더에서 파일을 마이그레이션하려면 다음 .xml 파일은 원본 컴퓨터의 Sample.docC:\EngineeringDrafts 파일만 대상 컴퓨터로 마이그레이션합니다.

    <migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
    <component type="Documents" context="System">
      <displayName>Component to migrate all Engineering Drafts Documents</displayName>
      <role role="Data">
        <rules>
          <include>
            <objectSet>
              <pattern type="File"> C:\EngineeringDrafts\ [Sample.doc]</pattern>
            </objectSet>
          </include>
        </rules>
      </role>
    </component>
    </migration>
    
  • 모든 위치에서 파일을 마이그레이션합니다. 드라이브의 Sample.doc 모든 위치에서 C:\ 파일을 마이그레이션하려면 다음 예제와 같이 패턴> 요소를 사용합니다<. 드라이브에 C:\ 이름이 같은 여러 파일이 있는 경우 이 이름의 모든 파일이 마이그레이션됩니다.

    <pattern type="File"> C:\* [Sample.doc] </pattern>
    

    컴퓨터의 모든 드라이브에서 Sample.doc 파일을 마이그레이션하려면 다음 예제와 같이 스크립트>를 사용합니다<. 이름이 같은 여러 파일이 있는 경우 이 이름의 모든 파일이 마이그레이션됩니다.

    <script>MigXmlHelper.GenerateDrivePatterns("* [sample.doc]", "Fixed")</script>