Go to the Windows registry in a DOS environment

Source: Internet
Author: User

Registry Editor can run not only in windows, but also in MS-DOS real mode. Sometimes when the registry is damaged and Windows cannot be started, we only need to repair or modify the Registry in DOS mode. The actual physical files of the Registry are system. dat and user. dat, which means that the data in the registry is stored in these two files.

Export Registry
  
This command backs up the Registry file.

Command Format: Regedit/L: System/R: User/e filename. Reg regpath

Parameter description:

/L: system specifies the path of the system. dat file.

/R: User specifies the path of the user. dat file.

/E: this parameter specifies that the Registry Editor needs to export the Registry. If this parameter is left blank, enter the file name of the exported registry.

Regpath: used to specify the Registry branch to export. If not specified, all registry branches will be exported.

If you want to save it in C: \ WINDOWS \ SYSTEM. dat and stored c: \ windows \ profiles \ User. all branches under the root key of hkey_classer_root In dat are exported to file. reg, you can execute the following command: Regedit/L: C: \ WINDOWS \/R: C: \ WINDOWS \ profiles \/e file1.reg hkey_classer_root

Import Registry

Command Format: Regedit/L: System/R: User File. Reg

Parameter description:

/L: system specifies the path of the system. dat file.

/R: User specifies the path of the user. dat file.

Rebuild Registry

Rebuild the registry, that is, re-create the system. dat and user. DAT files.

Command Format: Regedit/L: System/R: User/C file. Reg

Parameter description:

/L: system specifies the path of the system. dat file.

/R: User specifies the path of the user. dat file.

/C: This parameter tells the Registry Editor to re-create the Registry with the content in the specified. reg file.

If you want to use file. rebuild the entire registry in the reg file and save it to C: \ WINDOWS \ SYSTEM. dat and c: \ windows \ profiles \ User. dat, the executable command: Regedit/L: C: \ WINDOWS \/R: C: \ WINDOWS \ profiles \/C file1.reg

Delete A registry Branch

This command can delete a subkey branch in the registry.

Command Format: Regedit/L: System/R: User/d regpath

Parameter description:

/L: system specifies the path of the system. dat file.

/R: User specifies the path of the user. dat file.

/C: This parameter tells the Registry Editor to delete the registry subkey branch specified by regpath.

Restore the Registry

Scanreg.exe can check, back up, restore, and repair the Registry. This command is stored in the "WINDOWS \ command" directory.

Command Format: scanreg [/<option>]

Parameter description:

The/backup parameter is used to back up the registry and related configuration files. These files \ System under the Windows directory. dat, user. dat, win. INI, system. INI files, which are compressed into RB --?. A cab file is stored in the \ windows \ sysbckup directory. Multiple CAB files are generated when you use this command multiple times. Generally, from 000, the maximum number of backups is 5 by default. You can modify the maximum number of backups in the \ windows \ scanreg. ini file by modifying "maxbackupcopies = ?" .

The/restore parameter selects a backup to restore the Registry. This command cannot be executed in Windows 98. It must be shut down and restarted to run in pure DOS mode.

The/fix parameter is used to repair the corrupted registry. This command can only be run in DOS mode.

The/comment = "<comment>" parameter adds detailed comments to the cab file when backing up the registry.

To restore a corrupted registry file, run the scanreg command to restore the file. First, go to the DOS operating environment and run the following command: scanreg/restore

The system will prompt the Registry backup status, including the cab file name and backup time. You can select the cab file to be restored for restoration.

To view all backup files and backup-related parts, run the following command: scanreg/restore/comment.

If the registry is faulty, use scanreg to fix it. The command is scanreg/fix.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.