摘要
本文介绍了在运行 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,然后双击“注册表检查器”主题。