How do I use the Registry command?

Source: Internet
Author: User
Tags ini time and date

What is a registry?

The registry (Registry, the traditional Chinese version of Windows called logins) is an important database in Microsoft Windows for storing system and application settings information. As early as the introduction of OLE technology in Windows 3.0, the registry has appeared. The later Windows NT was the first operating system to use the registry extensively from the system level. However, starting with Microsoft Windows 95, the registry is truly a regular contact for Windows users and continues to the present in the operating system that follows.

What is the registration form

  How do I open the registry?

Access to the registry method, Windows XP system and Windows7 open the registry method is basically the same, because we previously for everyone detailed introduction to the Registry Editor how to open, so here will not repeat the introduction, will not friends please read: How to open the registry.

  Use of registry commands

The registry is a data file designed for all 32-bit hardware/drivers and 32-bit applications in Windows NT and WINDOWS95. The 16-bit drive does not work under Winnt, so all devices are controlled through the registry, which is typically controlled by the BIOS. Under Win95, 16-bit drivers continue to work in real mode devices, which are controlled using System.ini. 16-bit applications work under NT or WIN95, and their programs still refer to Win.ini and System.ini files for information and control.

In the absence of a registry, the operating system does not get the necessary information to run and control the attached devices and applications and to respond correctly to user input.

Registry Editor can be run not only under Windows, but also in MS-DOS command line mode. Note that "MS-DOS" here refers to pure MS-DOS, not the emulated MS-DOS mode running under Windows, you can press F8 at startup, select Command Prompt Only in the boot menu that appears, or under Windows from the Start menu, select "Shut down System" and choose "Restart your computer and switch to MS-DOS" to enter pure MS-DOS.

MS-DOS Registry Editor is not as powerful as windows, but it is unique. For example, when there is a problem with the system can not start Windows, its role is reflected. First of all, the actual physical file of the registry is System.dat and User.dat, which means that the data in the registry is stored in these two files. With that in mind, let's take a look at the role of MS-DOS Registry Editor in the end.

1. Export Registry Files

This feature can be used to make a backup of the registry files.

Command format:

regedit/l:system/r:user/e Filename.reg Regpath

Parameter detailed:

/L:SYSTEM specifies the path where the System.dat file resides.

/R:USER specifies the path where the User.dat file resides.

/e: This parameter specifies Registry Editor to export registry operations, blank after this parameter, and enter the file name of the exported registry.

REGPATH specifies which registry branch to export, and if unspecified, all the registry branches are exported.

Note:

The/l:system and/r:user parameters are optional and, if the default, Registry Editor considers that the System.dat and User.dat are operating under the Windows directory. However, if you start from a floppy disk, you must specify the specific path of the System.dat and User.dat files using the/L and/R parameters, otherwise registry Editor will not be able to find them.

Examples:

If it will be saved in C:windowssystem.dat and saved in

The branches under all hkey_classer_root root keys in C:windowsprofilesuser.dat are exported to File.reg, as follows:

regedit/l:c:windows/r:cwindowsprofiles/e File1.reg Hkey_classer_root

In most cases, we just need to export all the registry entries in the default directory, command format: regedit/e Allfile.reg

2. Import registry Files

Imports the specified registry files into the registry and creates new or overwritten these imported subkey branches, key value entries, and key values.

Command format:

Regedit/l:system/r:user File.reg

Parameter detailed:

/L:SYSTEM specifies the path where the System.dat file resides.

/R:USER specifies the path where the User.dat file resides.

Note:

Importing the registry and exporting the registry differ in parameters, and it simply needs to specify the path to the. reg file being imported, rather than having parameters such as "/e", "/C".

An example is provided:

If the contents of the File1.reg exported in the previous example are imported into C:windowssystem.dat and C:windowsprofilesuser.dat, the commands are as follows: Regedit/l:c:windows/r:c: Windowsprofile File1.reg

3. Rebuild the Registration Form

You can re-establish the entire registry with the contents of the specified. reg file, which is to re-establish the System.dat and User.dat files.

Command format:

REGEDIT/L:SYSTEM/R:USER/C File.reg

Parameter detailed:

/L:SYSTEM specifies the path where the System.dat file resides.

/R:USER specifies the path where the User.dat file resides.

/C: This parameter tells Registry Editor to re-establish the registry with the contents of the. reg file specified.

Note:

Parameter/C is a risky option that will import the entire contents of the specified registry file, starting from beginning to end creating a new registry.

An example is provided:

If we want to re-establish the entire registry with the contents of the File1.reg file and save it to C:windowssystem.dat and C:windowsprofilesuser.dat, the commands are as follows:

REGEDIT/L:C:WINDOWS/R:C:WINDOWSPROFILES/C File1.reg

4. Delete Registry Branch

This command deletes a subkey branch in the registry.

Command format:

REGEDIT/L:SYSTEM/R:USER/D Regpath

Parameter detailed:

/L:SYSTEM specifies the path where the System.dat file resides.

/R:USER specifies the path where the User.dat file resides.

/C: This parameter tells the Registry Editor (WWW.PC841.COM computer Pepsi) to remove the registry subkey specified by Regpath.

Note:

Parameter/C deletes all content contained under the specified subkey, including all subkeys, key values, and key values.

An example is provided:

If we want to delete the Hkey_local_machinesoftwaremicrosoftwindowscurrenversionrun branch in the registry, the command is as follows: Regedit/l:c:windows/r:c: WINDOWSPROFILES/D Hkey_local_machinesoftwaremicrosoftwindowscurrenversionrun

5. Registry Checker

The Registry Checker under Ms_dos Scanreg.exe can be used to back up and restore the registry.

Command format:

Scanreg/backup/restore/comment/fix

Parameter detailed:

/backup used to back up the registry immediately

/restore displays all backup files according to the time and date of backup

/comment displays parts of the backup file in/restore

/fix Fix registry File error

Note:

When displaying the backed-up registry files, compress the backed up files to. CAB files listed, the following word for the CAB file is started or is notstarted,started that the file can successfully start Windows, is a good backup file, notstarted that the file is not used to start Windows, So I don't know if it's a good backup.

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.