In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how to read / modify / delete registry entries under CMD. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
Fortunately, the regedit.exe that comes with the system is sufficient.
1, read the registry
First export the registry key you want to query, and then use type to view it, such as:
C:\ > regedit / e 1.reg "HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Terminal Server\ WinStations\ RDP-Tcp"
C:\ > type 1.reg | find "PortNumber"
"PortNumber" = dword:00000d3d
C:\ > del 1.reg
So the port of Terminal Services is 3389 (hexadecimal d3D)
2, modify / delete registry key
First echo a reg file, and then import it, such as:
Echo Windows Registry Editor Version 5.00 > 1.reg
Echo. > > 1.reg
Echo [HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ TelnetServer\ 1.0] > > 1.reg
Echo "TelnetPort" = dword:00000913 > > 1.reg
Echo "NTLM" = dword:00000001 > > 1.reg
Echo. > > 1.reg
Regedit / s 1.reg
Change the telnet service port to 2323 (hexadecimal 913) and the NTLM authentication mode is 1.
To delete an item, add a minus sign before the name, such as:
[- HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ Serv-U]
To delete a value, use a minus sign after the equal sign, such as:
[HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Run]
"KAVRun" =-
3, access the registry with inf file
You can also use the following inf file to implement the three operations facing the registry on the
[Version]
Signature= "$WINDOWS NT$"
[DefaultInstall]
AddReg=My_AddReg_Name
DelReg=My_DelReg_Name
[My_AddReg_Name]
HKLM,SOFTWARE\ Microsoft\ TelnetServer\ 1.0 Telnet PortJournal 0x00010001Magne2323
HKLM,SOFTWARE\ Microsoft\ TelnetServer\ 1.0 NTLM Magi 0x00010001Power1
[My_DelReg_Name]
HKLM,SYSTEM\ CurrentControlSet\ Services\ Serv-U
HKLM,SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Run,KAVRun
Write it to c:\ path\ reg.inf and then "install" with the following command:
Rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 c:\ path\ reg.inf
The following points are explained:
1, [Version] and [DefaultInstall] are required, AddReg and DelReg must have at least one. My_AddReg_Name and My_DelReg_Name can be customized.
0x00010001 represents the REG_DWORD data type, and 0x00000000 or omits the item (leaving a comma) for REG_SZ (string). 0x00020000 stands for REG_EXPAND_SZ.
2323 can also be replaced by 0x913.
For more information about inf files, you can refer to the DDK help documentation.
2Grammer InstallHinfSection is case sensitive. There is only a comma between it and setupapi, no space.
128 indicates a given path. For other values and meanings of this parameter, please see MSDN.
In particular, the last parameter must be the full path of the inf file, not a relative path.
3The items in the 3jinf file are case-insensitive.
This is the end of the article on "how to read / modify / delete registry keys under CMD". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.