Registry learning and common registry modifications

Data Structure

  1. Tree, branch nodes and leaf nodes can store data
  2. Each node stores the data as the key -> List <Value (Name - Type - data)>; names are case-insensitive
  3. type of data
    • REG_BINARY binary type, displayed in hexadecimal
    • DWORD / QWORD type DWORD 32-bit value, QWORD to 64
    • REG_SZ string type, can not exceed the maximum length of 255 characters
    • REG_EXPAND_SZ extended string type, variable explain%%
    • REG_MULTI_SZ
  4. Registry Hive file is stored in the storage path \Windows\System32\config

Five root keys

HKEY_USERS

Default subkey HKEY_CURRENT_USER content and consistency, do not control other

HKEY_CURRENT_USER

Save the currently logged on user data, customized configuration, with the logged-on user content key differs

  1. ControlPanel

Control panel settings, desktop background, appearance of the container, etc.

  1. Software

Software installation settings in the current environment, windows itself built-in features

HKEY_LOCAL_MACHINE

Stored system information, including hardware configuration, peripheral devices, a network is provided, installed software

  1. HARDWARE

Setting the information, driver-related computer hardware

  1. SAM SECURITY

User groups, users, system security settings, assign permissions

  1. SOFTWARE

Installed software information, and HKEY_CURRENT_USER / Software is different is that this will take effect for all users

  1. SYSTEM

System startup, the driver loads, etc. related to the operating system itself, the setting information

HKEY_CLASSES_ROOT

File type, file associations, icon extensions, which file types with which software to open

HKEY_CURRENT_CONFIG

The current hardware configuration values

Write registry script (the first method)

Windows Registry Editor Version 5.00
这个空行一定要的
[HKEY_CURRENT_USER\Software]
"键值名称"=键值

Add / Remove subkey

  • Add subkey
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\键位置]
  • Delete subkey
Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\键位置]

Setting key

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\键位置]
@="lcazhj"                          设置默认值
"姓名"="LC"                           设置字符串值 REG_SZ
"地址"=hex(2):hexvalue                设置字符串 REG_EXPAND_SZ
"地超"=hex(7):hexvalue                设置字符串 REG_MULTI_SZ
"年龄"=hex:22                     设置二进制值
"婚否"=DWORD:00000000             设置 DWORD 值

下面是删除键值

"姓名"=-

Write registry script (using the reg command)

reg add "HKLM\SOFTWARE\MYCO" /v data /t REG_DWORD /d 1 /f 
/v 名称
/t 数据类型 REG_SZ|REG_MULTI_SZ|REG_EXPAND_SZ|REG_DWORD|REG_QWORD|REG_BINARY|REG_NONE
/d 数据
/f 强制执行

Common examples of problem solving registry

Change my music, my default location Pictures, My Videos, My Documents, Favorites, Desktop, download

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders 

Show Menu Bar Explorer

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"AlwaysShowClassicMenu"=dword:00000001

Show hidden files (hidden files, hidden files, extensions)

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Hidden"=dword:00000001
"ShowSuperHidden"=dword:00000001
"HideFileExt"=dword:00000000

Turn off the firewall

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\StandardProfile]
"EnableFirewall"=dword:00000000

Shut down the system update

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoWindowsUpdate"=dword:00000001

Refresh the registry immediately, without having to restart to take effect

  1. Restart explorer.exe to take effect
  2. Run RunDll32.exe USER32.DLL, UpdatePerUserSystemParameters

    Little promotion

    Writing is not easy, I hope the support of open source software, and my gadgets, welcome to gitee point star, fork, put bug.

Excel common import and export, support Excel formulas
blog address: https://blog.csdn.net/sanri1993/article/details/100601578
gitee: https://gitee.com/sanri/sanri-excel-poi

Use the template code, the gadget generate code from the database, and some projects can often be used in the
blog address: https://blog.csdn.net/sanri1993/article/details/98664034
gitee: https://gitee.com/ sanri / sanri-tools-maven

Guess you like

Origin www.cnblogs.com/sanri1993/p/11832389.html