Scanload / loadstate USMT使用我创建的应该保存其他数据的自定义XML提供错误26,错误表示缺少元素内容

时间:2015-02-02 13:05:08

标签: xml migration mxe

我正处于迁移过程中,似乎会产生问题。我想用所有内容迁移所有用户数据并使用USMT。默认情况下,大多数用户都已备份,并且工作正常。因为我还想为用户保存一些其他信息,所以我要创建一个自定义XML。

我得到的错误在输出日志中:

  

2015-02-02 13:57:18,错误[0x08055d] MXE代理:迁移XML C:\ WKSBackup \ myfile.xml格式不正确。消息:元素应该有一些内容。

我现在正在寻找这个问题,因为超过4小时并且无法弄清楚为什么会发生这种情况。我的意思是我经历了每一个元素,看不到一个空洞。任何帮助或建议都会有所帮助

附件是XML文件的内容

<?xml version="1.0" encoding="UTF-8" ?>
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/wallpaper">

    <!--This component migrates wallpaper settings-->
    <component type="System" context="User">
        <displayName>Wallpapers</displayName>
        <role role="Settings">
            <rules>
                <include>
                    <objectSet>
                        <pattern type="Registry">HKCU\Control Panel\Desktop [Pattern]</pattern>
                        <pattern type="Registry">HKCU\Control Panel\Desktop [PatternUpgrade]</pattern>
                        <pattern type="Registry">HKCU\Control Panel\Desktop [TileWallpaper]</pattern>
                        <pattern type="Registry">HKCU\Control Panel\Desktop [WallPaper]</pattern>
                        <pattern type="Registry">HKCU\Control Panel\Desktop [WallpaperStyle]</pattern>
                        <pattern type="Registry">HKCU\Software\Microsoft\Windows\CurrentVersion\Themes [SetupVersion]</pattern>
                        <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [BackupWallpaper]</pattern>
                        <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [TileWallpaper]</pattern>
                        <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [Wallpaper]</pattern>
                        <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [WallpaperFileTime]</pattern>
                        <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [WallpaperLocalFileTime]</pattern>
                        <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [WallpaperStyle]</pattern>
                        <content filter="MigXmlHelper.ExtractSingleFile(NULL, NULL)">
                            <objectSet>
                                <pattern type="Registry">HKCU\Control Panel\Desktop [WallPaper]</pattern>
                                <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [BackupWallpaper]</pattern>
                                <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [Wallpaper]</pattern>
                            </objectSet>
                        </content>
                    </objectSet>
                </include>
            </rules>
        </role>
    </component>

    <!--This component migrates wallpaper files-->
    <component type="Documents" context="System">
        <displayName>Move JPG and BMP</displayName>
        <role role="Data">
            <rules>
                <include>
                    <objectSet>
                        <pattern type="File"> %windir% [*.bmp]</pattern>
                        <pattern type="File"> %windir%\web\wallpaper [*.jpg]</pattern>
                        <pattern type="File"> %windir%\web\wallpaper [*.bmp]</pattern>
                    </objectSet>
                </include>
            </rules>
        </role>
    </component>

    <!-- This component migrates appdata local office-->
    <component context="UserAndSystem" type="Application">
        <displayName>Copy AppData roaming</displayName>
        <role role="Data">
            <rules>
                <include>
                    <objectSet>
                        <pattern type="File"> %APPDATA%\Office</pattern>
                        <pattern type="File"> %APPDATA%\Excel</pattern>
                        <pattern type="File"> %APPDATA%\Powerpoint</pattern>
                        <pattern type="File"> %APPDATA%\Access</pattern>
                        <pattern type="File"> %APPDATA%\Outlook</pattern>
                        <pattern type="File"> %APPDATA%\OneNote</pattern>
                        <pattern type="File"> %APPDATA%\Signatures</pattern>
                        <pattern type="File"> %APPDATA%\Templates</pattern>
                        <pattern type="File"> %APPDATA%\UProof</pattern>
                        <pattern type="File"> %APPDATA%\Visio</pattern>
                        <pattern type="File"> %APPDATA%\Forms</pattern>
                    </objectSet>
                </include>
            </rules>
        </role>
    </component>

    <!--This component migrates appdata local office-->
    <component context="UserAndSystem" type="Application">
        <displayName>Copy AppData local</displayName>
        <role role="Data">
            <rules>
                <include>
                    <objectSet>
                        <pattern type="File"> %LOCALAPPDATA%\Office</pattern>
                        <pattern type="File"> %LOCALAPPDATA%\Excel</pattern>
                        <pattern type="File"> %LOCALAPPDATA%\Powerpoint</pattern>
                        <pattern type="File"> %LOCALAPPDATA%\Access</pattern>
                        <pattern type="File"> %LOCALAPPDATA%\Outlook</pattern>
                        <pattern type="File"> %LOCALAPPDATA%\OneNote</pattern>
                        <pattern type="File"> %LOCALAPPDATA%\Signatures</pattern>
                        <pattern type="File"> %LOCALAPPDATA%\Templates</pattern>
                        <pattern type="File"> %LOCALAPPDATA%\UProof</pattern>
                        <pattern type="File"> %LOCALAPPDATA%\Visio</pattern>
                        <pattern type="File"> %LOCALAPPDATA%\Forms</pattern>
                    </objectSet>
                </include>
            </rules>
        </role>
    </component>

    <!--This component migrates DesktopData-->
    <component context="UserAndSystem" type="Application">
        <displayName>Copy DesktopData</displayName>
        <role role="Data">
            <rules>
                <include>
                    <objectSet>
                        <pattern type="File"> %USERPROFILE%\Desktop</pattern>
                    </objectSet>
                </include>
            </rules>
        </role>
    </component>

    <!-- Mozilla Firefox - Modified for any version to migapp-->
    <component context="UserAndSystem" type="Application">
        <displayName _locID="migapp.firefox3">Mozilla Firefox</displayName>
        <environment name="GlobalEnv" />
        <environment name="GlobalEnvX64" />
        <role role="Settings">
            <detection>
                <conditions>
                    <condition>MigXmlHelper.DoesObjectExist("Registry","%HklmWowSoftware%\Mozilla\Mozilla Firefox *.*\bin [PathToExe]")</condition>
                </conditions>
            </detection>
            <rules context="User">
                <destinationCleanup>
                    <objectSet>
                        <pattern type="File">%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\*\Cache\* [*]</pattern>
                    </objectSet>
                </destinationCleanup>
                <include>
                    <objectSet>
                        <pattern type="File">%CSIDL_APPDATA%\Mozilla\Firefox\* [*]</pattern>
                        <pattern type="File">%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\* [*]</pattern>
                    </objectSet>
                </include>
                <exclude>
                    <objectSet>
                        <pattern type="File">%CSIDL_APPDATA%\Mozilla\Firefox\Crash Reports\* [*]</pattern>
                        <pattern type="File">%CSIDL_APPDATA%\Mozilla\Firefox\Profiles\*\ [pluginreg.dat]</pattern>
                        <pattern type="File">%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\*\Cache\* [*]</pattern>
                    </objectSet>
                </exclude>
                <merge script="MigXmlHelper.SourcePriority()">
                    <objectSet>
                        <pattern type="File">%CSIDL_APPDATA%\Mozilla\Firefox\* [*]</pattern>
                        <pattern type="File">%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\* [*]</pattern>
                    </objectSet>
                </merge>
            </rules>
        </role>
    </component>

    <!-- Google Chrome to migapp-->
    <component context="UserAndSystem" type="Application">
        <displayName _locID="migapp.chrome1">Google Chrome</displayName>
        <environment name="GlobalEnv" />
        <environment name="GlobalEnvX64" />
        <role role="Settings">
            <destinationCleanup>
                <objectSet>
                    <pattern type="File">%CSIDL_LOCAL_APPDATA%\Google\Chrome\User Data\*\Cache\* [*]</pattern>
                </objectSet>
            </destinationCleanup>
            <detection>
                <conditions>
                    <condition>MigXmlHelper.DoesObjectExist("Registry","%HklmWowSoftware%\Google\Chrome\")</condition>
                </conditions>
            </detection>
            <rules context="User">
                <include>
                    <objectSet>
                        <pattern type="File">%CSIDL_LOCAL_APPDATA%\Google\Chrome\User Data\* [*]</pattern>
                    </objectSet>
                </include>
                <exclude>
                    <objectSet>
                        <pattern type="File">%CSIDL_LOCAL_APPDATA%\Google\Chrome\User Data\*\Cache\* [*]</pattern>
                    </objectSet>
                </exclude>
                <merge script="MigXmlHelper.SourcePriority()">
                    <objectSet>
                        <pattern type="File">%CSIDL_LOCAL_APPDATA%\Google\Chrome\User Data\* [*]</pattern>
                    </objectSet>
                </merge>
            </rules>
        </role>
    </component>

     <component type="System" context="user">
        <displayName _locID="miguser.User_Exclusions">User Exclusions</displayName>
        <role role="Data">
            <rules>
                <unconditionalExclude>
                     <objectSet>
                        <pattern type="File">%CSIDL_DESKTOP%\* [*.msi]</pattern>
                        <pattern type="File">%CSIDL_DESKTOP%\* [*.exe]</pattern>
                        <pattern type="File">%CSIDL_DESKTOP%\* [*.lnk]</pattern>
                        <pattern type="File">%CSIDL_DESKTOP%\* [*.lnk2]</pattern>
                        <pattern type="File">%CSIDL_DESKTOPDIRECTORY%\* [*.msi]</pattern>
                        <pattern type="File">%CSIDL_DESKTOPDIRECTORY%\* [*.exe]</pattern>
                        <pattern type="File">%CSIDL_DESKTOPDIRECTORY%\* [*.lnk]</pattern>
                        <pattern type="File">%CSIDL_DESKTOPDIRECTORY%\* [*.lnk2]</pattern>
                        <pattern type="File">%CSIDL_DEFAULT_DESKTOP%\* [*.msi]</pattern>
                        <pattern type="File">%CSIDL_DEFAULT_DESKTOP%\* [*.exe]</pattern>
                        <pattern type="File">%CSIDL_DEFAULT_DESKTOP%\* [*.lnk]</pattern>
                        <pattern type="File">%CSIDL_DEFAULT_DESKTOP%\* [*.lnk2]</pattern>
                        <pattern type="File">%CSIDL_DEFAULT_PROGRAMS%\* [*]</pattern>
                        <pattern type="File">%CSIDL_DEFAULT_STARTMENU%\* [*]</pattern>
                        <pattern type="File">%CSIDL_DEFAULT_STARTUP%\* [*]</pattern>
                        <pattern type="File">%CSIDL_PROGRAMS%\* [*]</pattern>
                        <pattern type="File">%CSIDL_STARTMENU%\* [*]</pattern>
                        <pattern type="File">%CSIDL_STARTUP%\* [*]</pattern>
                    </objectSet>
                </unconditionalExclude>
            </rules>
        </role>
    </component>

    <!-- This component EXCLUDES the following shared User specific stuff-->
    <component type="System" context="System">
        <displayName _locID="miguser.Shared_User_Exclusions">Shared User Exclusions</displayName>
        <role role="Data">
            <rules>
                <unconditionalExclude>
                    <objectSet>
                        <pattern type="File">%CSIDL_COMMON_DESKTOPDIRECTORY%\* [*.msi]</pattern>
                        <pattern type="File">%CSIDL_COMMON_DESKTOPDIRECTORY%\* [*.exe]</pattern>
                        <pattern type="File">%CSIDL_COMMON_DESKTOPDIRECTORY%\* [*.lnk]</pattern>
                        <pattern type="File">%CSIDL_COMMON_DESKTOPDIRECTORY%\* [*.lnk2]</pattern>
                        <pattern type="File">%CSIDL_COMMON_PROGRAMS%\* [*]</pattern>
                        <pattern type="File">%CSIDL_COMMON_STARTMENU%\* [*]</pattern>
                        <pattern type="File">%CSIDL_COMMON_STARTUP%\* [*]</pattern>
                        <pattern type="File">%CSIDL_PROGRAMS%\* [*]</pattern>
                        <pattern type="File">%CSIDL_STARTMENU%\* [*]</pattern>
                        <pattern type="File">%CSIDL_STARTUP%\* [*]</pattern>
                    </objectSet>
                </unconditionalExclude>
            </rules>
        </role>
    </component>

</migration>

2 个答案:

答案 0 :(得分:2)

问题是微软不支持单个元素......

<environment name="GlobalEnv" />

需要转换...希望这将有助于未来的某个人

答案 1 :(得分:0)

您需要在XML的顶部:

   <_locDefinition>
      <_locDefault _loc="locNone"/>
      <_locTag _loc="locData">displayName</_locTag>
   </_locDefinition>

   <namedElements>
      <!-- Global -->
      <environment name="GlobalEnvX64">
         <conditions>
            <condition>MigXmlHelper.IsNative64Bit()</condition>
         </conditions>
         <variable name="HklmWowSoftware">
            <text>HKLM\SOFTWARE\Wow6432Node</text>
         </variable>
         <variable name="ProgramFiles32bit">
            <text>%ProgramFiles(x86)%</text>
         </variable>
         <variable name="CommonProgramFiles32bit">
            <text>%CommonProgramFiles(x86)%</text>
         </variable>
      </environment>
      <environment name="GlobalEnv">
         <conditions>
            <condition negation="Yes">MigXmlHelper.IsNative64Bit()</condition>
         </conditions>
         <variable name="HklmWowSoftware">
            <text>HKLM\Software</text>
         </variable>
         <variable name="ProgramFiles32bit">
            <text>%ProgramFiles%</text>
         </variable>
         <variable name="CommonProgramFiles32bit">
            <text>%CommonProgramFiles%</text>
         </variable>
      </environment>

      <!-- Global USER -->
      <environment context="USER" name="GlobalEnvX64User">
         <conditions>
            <condition>MigXmlHelper.IsNative64Bit()</condition>
         </conditions>
         <variable name="VirtualStore_ProgramFiles32bit">
            <text>%CSIDL_VIRTUALSTORE_PROGRAMFILES(X86)%</text>
         </variable>
         <variable name="VirtualStore_CommonProgramFiles32bit">
            <text>%CSIDL_VIRTUALSTORE_COMMONPROGRAMFILES(X86)%</text>
         </variable>
      </environment>
      <environment context="USER" name="GlobalEnvUser">
         <conditions>
            <condition negation="Yes">MigXmlHelper.IsNative64Bit()</condition>
         </conditions>
         <variable name="VirtualStore_ProgramFiles32bit">
            <text>%CSIDL_VIRTUALSTORE_PROGRAMFILES%</text>
         </variable>
         <variable name="VirtualStore_CommonProgramFiles32bit">
            <text>%CSIDL_VIRTUALSTORE_COMMONPROGRAMFILES%</text>
         </variable>
      </environment>
   </namedElements>