返回代码

本主题论述 用户状态迁移工具 (USMT) 5.0 返回代码和错误消息。并且,其中的一个表中列出 USMT 返回代码及其关联的缓解步骤。此外,本主题提供有助于使用日志文件确定收到错误的原因的提示。

了解运行 USMT 的要求有助于最大限度地减少 USMT 迁移中的错误。有关详细信息,请参阅USMT 要求

本主题内容

USMT 返回代码

USMT 错误消息

有关返回代码和错误消息的疑难解答

USMT 返回代码

如果你在 USMT 迁移期间遇到错误,可以使用返回代码和关联 USMT 错误消息中提供的更具体信息,解决该问题并确定缓解步骤。

返回代码分为以下几大类别,用以描述错误报告的范围:

  • “成功”或“用户取消”

  • 命令行无效

  • 设置和初始化

  • 非致命错误

  • 致命错误

作为最佳实践,建议你在 ScanStateLoadStateUsmtUtils 命令行中将详细级别设置为 5(/v*:5*),以便在各个 USMT 日志中提供最详细的报告。如果希望日志文件输出至调试程序,可以使用较高的详细级别。

USMT 错误消息

与关联的返回代码相比,错误消息提供的有关迁移问题的信息更为详细。例如,ScanStateLoadStateUsmtUtils 工具可能返回的代码为 “11” (“USMT_INVALID_PARAMETERS”),返回的相关错误消息为“已指定 /key 和 /keyfile”。错误消息显示在命令提示符中,且在 ScanStateLoadStateUsmtUtils 日志文件中进行标识,有助于你确定收到返回代码的原因。

通过在命令行上键入 net helpmsg,然后键入错误代码号,可以获得有关列出的所有 Windows 应用程序编程接口 (API) 系统错误代码的详细信息。有关系统错误代码的详细信息,请参阅此 Microsoft 网站

有关返回代码和错误消息的疑难解答

下表按数值列出了每个返回代码,同时还列出了关联的错误消息和建议的疑难解答措施。

返回代码值 返回代码 错误消息 疑难解答、缓解措施、解决方法 类别

0

USMT_SUCCESS

Successful run

不适用

“成功”或“取消”

1

USMT_DISPLAY_HELP

Command line help requested

不适用

“成功”或“取消”

2

USMT_STATUS_CANCELED

Gather was aborted because of an EFS file

不适用

User chose to cancel (such as pressing CTRL+C)

不适用

“成功”或“取消”

3

USMT_WOULD_HAVE_FAILED

At least one error was skipped as a result of /c

查看 ScanState、LoadState 或 UsmtUtils 日志,获取有关命令行错误的详细信息。

11

USMT_INVALID_PARAMETERS

/all conflicts with /ui, /ue or /uel

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/auto expects an optional parameter for the script folder

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/encrypt can't be used with /nocompress

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/encrypt requires /key or /keyfile

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/genconfig can't be used with most other options

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/genmigxml can't be used with most other options

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/hardlink requires /nocompress

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/key and /keyfile both specified

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/key or /keyfile used without enabling encryption

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/lae is only used with /lac

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/listfiles cannot be used with /p

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/offline requires a valid path to an XML file describing offline paths

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/offlinewindir requires a valid path to offline windows folder

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/offlinewinold requires a valid path to offline windows folder

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

A command was already specified

验证命令行语法是否正确,以及是否没有重复命令。

An option argument is missing

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

An option is specified more than once and is ambiguous

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

By default /auto selects all users and uses the highest log verbosity level.Switches like /all, /ui, /ue, /v are not allowed.

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

Command line arguments are required.Specify /?for options.

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

Command line option is not valid

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

EFS parameter specified is not valid for /efs

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

File argument is invalid for /genconfig

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

File argument is invalid for /genmigxml

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

Invalid space estimate path.Check the parameters and/or file system permissions

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

List file path argument is invalid for /listfiles

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

Retry argument must be an integer

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

Settings store argument specified is invalid

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。确保存储路径可访问且已设置正确的权限级别。

Specified encryption algorithm is not supported

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

The /efs:hardlink requires /hardlink

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

/targetWindows7 选项仅可用于 Windows XP、Windows Vista® 和 Windows 7

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

The store parameter is required but not specified

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

The source-to-target domain mapping is invalid for /md

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

The source-to-target user account mapping is invalid for /mu

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

Undefined or incomplete command line option

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

命令行无效

Use /nocompress, or provide an XML file path with /p"pathtoafile" to get a compressed store size estimate

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

User exclusion argument is invalid

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

Verbosity level must be specified as a sum of the desired log options: Verbose (0x01), Record Objects (0x04), Echo to debug port (0x08)

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

Volume shadow copy feature is not supported with a hardlink store

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

Wait delay argument must be an integer

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

12

USMT_ERROR_OPTION_PARAM_TOO_LARGE

Command line arguments cannot exceed 256 characters

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

命令行无效

Specified settings store path exceeds the maximum allowed length of 256 characters

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

13

USMT_INIT_LOGFILE_FAILED

Log path argument is invalid for /l

如果在 ScanState 命令行中指定 /l,则 USMT 会验证该路径。请验证驱动器和其他信息(例如文件系统字符)是否正确。

命令行无效

14

USMT_ERROR_USE_LAC

Unable to create a local account because /lac was not specified

创建本地帐户时,应使用命令行选项 /lac 和 /lae。

命令行无效

26

USMT_INIT_ERROR

Multiple Windows installations found

Listfiles.txt could not be created.请验证为创建此文件指定的位置是否有效。

设置和初始化

Software malfunction or unknown exception

请检查所有加载的 .xml 文件中是否有错误,以及使用 /I 加载 Config.xml 文件时出现的常见错误。

Unable to find a valid Windows directory to proceed with requested offline operation; Check if offline input file is present and has valid entries

请验证脱机输入文件是否存在,以及该文件是否包含有效条目。USMT 无法找到有效的脱机操作系统。请验证你的脱机目录映射。

27

USMT_INVALID_STORE_LOCATION

A store path can't be used because an existing store exists; specify /o to overwrite

Specify /o to overwrite an existing intermediate or migration store.

设置和初始化

A store path is missing or has incomplete data

确保存储路径可访问且已设置正确的权限级别。

An error occurred during store creation

确保存储路径可访问且已设置正确的权限级别。Specify /o to overwrite an existing intermediate or migration store.

为存储指定了不恰当的设备(如软盘)

确保存储路径可访问且已设置正确的权限级别。

Invalid store path; check the store parameter and/or file system permissions

Invalid store path; check the store parameter and/or file system permissions

The file layout and/or file content is not recognized as a valid store

确保存储路径可访问且已设置正确的权限级别。Specify /o to overwrite an existing intermediate or migration store.

存储路径中有一个存储与当前 USMT 版本不兼容

确保存储路径可访问且已设置正确的权限级别。

The store save location is read-only or does not support a requested storage option

确保存储路径可访问且已设置正确的权限级别。

28

USMT_UNABLE_GET_SCRIPTFILES

Script file is invalid for /i

请检查所有指定的迁移 .xml 文件中是否有错误。这是使用 /i 加载 Config.xml 文件时出现的常见错误。

设置和初始化

Unable to find a script file specified by /i

请验证脚本文件的位置,并确保命令行选项正确。

29

USMT_FAILED_MIGSTARTUP

A minimum of 250 MB of free space is required for temporary files

请验证系统是否满足 250 MB 的最低临时磁盘空间要求。可以设置环境变量 USMT_WORKING_DIR=<path> 重定向临时文件工作目录作为解决方法。

设置和初始化

Another process is preventing migration; only one migration tool can run at a time

请检查 ScanState 日志文件中的迁移 .xml 文件错误。

Failed to start main processing, look in log for system errors or check the installation

请检查 ScanState 日志文件中的迁移 .xml 文件错误。

Migration failed because of an XML error; look in the log for specific details

请检查 ScanState 日志文件中的迁移 .xml 文件错误。

Unable to automatically map the drive letters to match the online drive letter layout; Use /offline to provide a mapping table

请检查 ScanState 日志文件中的迁移 .xml 文件错误。

31

USMT_UNABLE_FINDMIGUNITS

An error occurred during the discover phase; the log should have more specific information

请检查 ScanState 日志文件中的迁移 .xml 文件错误。

设置和初始化

32

USMT_FAILED_SETMIGRATIONTYPE

An error occurred processing the migration system

请检查 ScanState 日志文件中的迁移 .xml 文件错误,或者通过在命令行上键入 /? 使用联机帮助。

设置和初始化

33

USMT_UNABLE_READKEY

Error accessing the file specified by the /keyfile parameter

请检查 ScanState 日志文件中的迁移 .xml 文件错误,或者通过在命令行上键入 /? 使用联机帮助。

设置和初始化

The encryption key must have at least one character

请检查 ScanState 日志文件中的迁移 .xml 文件错误,或者通过在命令行上键入 /? 使用联机帮助。

34

USMT_ERROR_INSUFFICIENT_RIGHTS

Directory removal requires elevated privileges

请以管理员身份登录,并使用提升的权限运行。

设置和初始化

No rights to create user profiles; log in as Administrator; run with elevated privileges

请以管理员身份登录,并使用提升的权限运行。

No rights to read or delete user profiles; log in as Administrator, run with elevated privileges

请以管理员身份登录,并使用提升的权限运行。

35

USMT_UNABLE_DELETE_STORE

A reboot is required to remove the store

重新启动以删除在执行该命令时无法删除的所有文件。

设置和初始化

A store path can't be used because it contains data that could not be overwritten

无法删除迁移存储。如果使用的是硬链接迁移存储,则其中可能包含一个锁定的文件。应手动删除该存储,或使用 usmtutils /rd 命令删除该存储。

There was an error removing the store

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

36

USMT_ERROR_UNsupported_PLATFORM

Compliance check failure; please check the logs for details

请调查系统中是否存在活跃的临时配置文件。

设置和初始化

Use of /offline is not supported during apply

在 Windows 预安装环境 (Windows PE) 中运行时,未使用 /offline 命令。

Use /offline to run gather on this platform

在 Windows PE 中运行时,未使用 /offline 命令。

37

USMT_ERROR_NO_INVALID_KEY

The store holds encrypted data but the correct encryption key was not provided

请验证是否已包含正确的加密 /key 或 /keyfile。

设置和初始化

38

USMT_ERROR_CORRUPTED_NOTENCRYPTED_STORE

An error occurred during store access

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。确保存储路径可访问且已设置正确的权限级别。

设置和初始化

39

USMT_UNABLE_TO_READ_CONFIG_FILE

Error reading Config.xml

查看 ScanState 日志或 LoadState 日志,获取有关 Config.xml 文件中命令行错误的详细信息。

设置和初始化

File argument is invalid for /config

请检查用于加载 Config.xml 文件的命令行。通过在命令行上键入 /?,可以使用联机帮助。

40

USMT_ERROR_UNABLE_CREATE_PROGRESS_LOG

Error writing to the progress log

无法创建进程日志。请验证该位置是否有效并且你是否具有写入权限。

设置和初始化

Progress log argument is invalid for /progress

无法创建进程日志。请验证该位置是否有效并且你是否具有写入权限。

41

USMT_PREFLIGHT_FILE_CREATION_FAILED

Can't overwrite existing file

无法创建进程日志。请验证该位置是否有效并且你是否具有写入权限。

设置和初始化

Invalid space estimate path.Check the parameters and/or file system permissions

查看 ScanState 日志或 LoadState 日志,获取有关命令行错误的详细信息。

42

USMT_ERROR_CORRUPTED_STORE

The store contains one or more corrupted files

查看 UsmtUtils 日志,获取有关损坏的文件的详细信息。关于如何提取未损坏文件的信息,请参阅从压缩 USMT 迁移存储中提取文件

61

USMT_MIGRATION_STOPPED_NONFATAL

Processing stopped due to an I/O error

USMT 已退出,但可以使用 /c 命令行选项、可选的可配置 <ErrorControl> 部分,或使用 /vsc 命令行选项继续操作。

非致命错误

71

USMT_INIT_OPERATING_ENVIRONMENT_FAILED

A Windows Win32 API error occurred

数据传输已开始,但是在创建迁移存储期间或应用阶段出现了错误。请查看 ScanState 日志或 LoadState 日志中的详细信息。

致命错误

An error occurred when attempting to initialize the diagnostic mechanisms such as the log

数据传输已开始,但是在创建迁移存储期间或应用阶段出现了错误。请查看 ScanState 日志或 LoadState 日志中的详细信息。

Failed to record diagnostic information

数据传输已开始,但是在创建迁移存储期间或应用阶段出现了错误。请查看 ScanState 日志或 LoadState 日志中的详细信息。

Unable to start.确保使用提升的权限运行 USMT

退出 USMT,并使用提升的权限再次登录。

72

USMT_UNABLE_DOMIGRATION

An error occurred closing the store

数据传输已开始,但是在创建迁移存储期间或应用阶段出现了错误。请查看 ScanState 日志或 LoadState 日志中的详细信息。

致命错误

An error occurred in the apply process

数据传输已开始,但是在创建迁移存储期间或应用阶段出现了错误。请查看 ScanState 日志或 LoadState 日志中的详细信息。

An error occurred in the gather process

数据传输已开始,但是在创建迁移存储期间或应用阶段出现了错误。请查看 ScanState 日志或 LoadState 日志中的详细信息。

Out of disk space while writing the store

数据传输已开始,但是在创建迁移存储期间或应用阶段出现了错误。请查看 ScanState 日志或 LoadState 日志中的详细信息。

Out of temporary disk space on the local system

数据传输已开始,但是在创建迁移存储期间或应用阶段出现了错误。请查看 ScanState 日志或 LoadState 日志中的详细信息。

另请参阅

其他资源

用户状态迁移工具 (USMT) 疑难解答
日志文件