使用 Microsoft 登录
登录或创建帐户。
你好,
使用其他帐户。
你有多个帐户
选择要登录的帐户。

摘要

本文介绍了在运行 MS-DOS 版本 (Scanreg.exe) 或 Windows 版本 (Scanregw.exe) 的注册表检查器工具时可以使用的命令行开关。

更多信息

语法

MS-DOS 版本:


Scanreg.exe [/backup] [/restore] ["/comment=<text>"] [/fix]
Scanreg.exe [backup] [/restore] ["/comment=<text>"] [/fix] [/opt]


Windows 版本:


Scanregw.exe [/backup] ["/comment=<text>"] [/autoscan] [/scanonly] [filename]

开关的说明

下表列出了每个命令行开关及其说明:


Switch Description
----------------------------------------------------------------------
/backup Backs up the registry and related files without
displaying any prompts.

/restore Displays a list of available backup files, sorted
by the date and time the backup was created.

"/comment=<text>" Enables you to add a descriptive comment to the
registry backup.

/fix Repairs any damaged portions of the registry, and
optimizes it by rebuilding it without unused space.

/autoscan Automatically scans the registry and backs it up
without displaying any prompts if there is no
backup for that date.

/scanonly Scans the registry and displays a message if any
errors are found. This switch does not back up the
registry.

filename Scans the registry file specified and displays a
message indicating whether or not any errors were
found. This switch does not back up the registry.

/opt The /opt command-line switch causes the
Registry Checker tool to optimize the
registry by removing unused space.

仅当您使用 Scanregw.exe 命令而没有任何命令行开关时,才显示“注册表扫描结果”对话框。 如果在运行 Scanregw.exe 时未发现注册表错误,系统将提示您创建当前注册表的备份副本。


"/comment=<text>" 开关可以单独使用,也可以与 /backup 开关一起使用。 例如,可以在命令提示符处键入以下命令行:


scanreg.exe "/comment=this is a registry backup"


scanreg.exe /backup "/comment=this is a registry backup"


第一个命令行启动注册表检查器工具图形用户界面 (GUI) ,并提示您创建一个注册表备份。 第二个命令行创建注册表的备份副本,并在不启动注册表检查器工具 GUI 的情况下添加注释。


有关注册表检查器工具的其他信息,请参见以下 Microsoft 知识库文章:

183887 Windows 注册表检查器工具 (Scanreg.exe) 说明

183603如何自定义注册表检查程序工具设置

201655 错误消息: 您已经恢复了一个良好的注册表
有关如何使用注册表检查器工具的其他信息,请依次单击“开始”、“帮助”、“索引”选项卡,键入 registry,然后双击“注册表检查器”主题。

需要更多帮助?

需要更多选项?

了解订阅权益、浏览培训课程、了解如何保护设备等。

社区可帮助你提出和回答问题、提供反馈,并听取经验丰富专家的意见。

此信息是否有帮助?

你对语言质量的满意程度如何?
哪些因素影响了你的体验?
按“提交”即表示你的反馈将用于改进 Microsoft 产品和服务。 你的 IT 管理员将能够收集此数据。 隐私声明。

谢谢您的反馈!

×