Use reg.exe

Source: Internet
Author: User

Author: Wu Jun

Although in most cases, we can use the Regedit and Regedit32 built-in registry editing tools of Windows 2000 to adjust the parameter settings in the registry. However, once Windows 2000 fails to access the GUI, the problem arises from incorrect settings of registry parameters. You must have a registry editing tool under the command line. Microsoft released reg.exe, a Registration Table editing tool under DOS, on the same Windows installation disc.

Region is reg.exe?

---- Reg.exe is part of the Windows 2000 resource toolkit. Therefore, before using reg.exe, you must first run setup.exe in the supporttoolsdirectory of the Windows 2000installation disc to install the resource toolkit. During the installation of the resource kit, the program automatically adds the PATH of the resource kit to the "PATH" variable in Windows 2000. After the installation is complete, the user can directly run reg.exe under the doscommand line.

---- The role is not inferior to the graphical Registry Editor in terms of functionality.

Reg.exe usage

---- We will take the "register" table as an example to describe how to use reg.exe to operate the registry. The add operation syntax for reg.exe is:

---- Reg add [\ Machine] Keyname [/v ValueName |/ve] [/t Type] [/s Separator] [/d Data] [/f]

---- Machine is used to specify the remote computer name. If the local computer is operated, this parameter is omitted. If you want to remotely operate a computer named Server, its Machine parameter is "\ Server ".

---- Keyname is used to specify the key under which the registry creates a registry value. This parameter must be expressed in the full path of the registry key, however, the four root keys in the Registry are generally abbreviated (the abbreviations of each root key are shown in Table 1 ). For example, if you want to operate on the registry key "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon", the Keyname parameter is "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon ". Note: If you are operating on the remote computer registry, you can only use the HKLM and HKCU root keys.

Screen. width-300) this. width = screen. width-300 "border = 0>

----/V Valuename |/ve is used to specify the name of the registry value to be added. The parameter/ve indicates the registry value whose key value is "default" under the specified registry key.

----/T Type is used to specify the Data Type of the created registry value. If not specified, the REG_SZ data Type is used by default (common data types are shown in table 2 ).

Screen. width-300) this. width = screen. width-300 "border = 0>

----/S Separator is used to specify characters to separate strings when the data type is REG_MULTI_SZ.

----/D Data is used to specify the Data of the created registry value.

----/F is used to specify whether to overwrite the registry value if it exists.

Application Instance

---- Example 1: create a registry value with the Data Type "SavePath" REG_SZ under "HKEY_CURRENT_USERSoftwareMydata" of the remote computer named "Server", and enter the following in the doscommand line:

---- Reg ADD \ ServerHKCUSoftwareMydata/v SavePath/d "c: Mydata"

---- Example 2: create a registry value named "IsNew" under "HKEY_CURRENT_USERSoftwareMydata" on the Local Computer and overwrite the registry value if this registry value exists, enter reg add HKCUSoftwareMydata/v IsNew/t REG_DWORD/d 1/f in the doscommand line.

---- For more registry operation methods, you can enter "Reg /? "To learn more about parameter settings.

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: 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.