The Windows Registry explains

Source: Internet
Author: User

Registry storage Structure:

The entire registry content consists primarily of items (keys), values (key values). (Open the registry via the regedit command)

5 a root key:

HKEY_CLASSES_ROOT (abbreviated HKCR)

HKEY_CURRENT_USER (abbreviated HKCU)

HKEY_LOCAL_MACHINE (abbreviated HKLM)

HKEY_USERS (abbreviated HKU)

Hkey_current_config (abbreviated HKCC)

Key values:

It consists of three parts, name, type, data.

Health value type:

Key value types are made up of 6 commonly used

String Value (REG_SZ)

Binary Value (REG_BINARY)

32-bit value (4 bytes) (REG_DWORD)

64-bit value (5 bytes) (Reg_qword)

Multi-string value (REG_MULTI_SZ)

Expandable String Value (REG_EXPAND_SZ)

Using the DOS command reg to operate the registry

The Reg command is provided by Windows, which can add, change, and display registry subkey information and values in a registry key.

REG ADD

Adds a new subkey or item to the registry.

Grammar:

REG ADD KeyName [/V entryname|/ve] [/t DataType] [/s separator] [/D value] [/f]

Parameters

KeyName

Specifies the full path of the subkey. For a remote computer, include the computer name before the subkey path in//computername/pathtosubkey. Ignoring ComputerName can result in default

Operation on the local computer. Start the path in the appropriate subtree. Valid subtree is HKLM, HKCU, HKCR, HKU, and HKCC.

/V

Specifies the name of the item to add to the specified subkey.

/ve

Specifies that entries added to the registry are null values.

/t

Specifies the data type of the item value. The DataType can be of several types:

/s

Specifies the characters used to separate multiple data instances. Use this parameter when REG_MULTI_SZ is specified as a data type and you need to list multiple items. If not specified, the default delimiter is used

Identifier/.

/d

Specifies the value of the new registry key.

/F

Add a subkey or item directly without asking for information.

Test Pass DOS command to modify the system boot warm tips.

Create a Test.bat script file, copy the following command:

@echo off

REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"/V legalnoticecaption/t reg_sz/d Warm tips/F

REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"/V legalnoticetext/t reg_sz/d Leave your desk to sleep!!! /F

Gpupdate/force

Exit

Double-click Run Test.bat after the script, log off the system, with the effect as follows:

The Windows Registry explains

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.