是否可以.reg
为 Windows 10 创建一个文件,以便仅编辑由八位字节组成的二进制值中特定地址的单个八位字节,n
而不更改其余的二进制值?
我想要改变"Settings"=binary:
:
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3
我只想将八位字节0008
的值从更改02
为03
,并保留其余数据不变:
答案1
- 导出注册表项: (PowerShell 变量)
Reg Export "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3" "$ENV:UserProfile\Documents\StuckRects3.reg"
- 编辑导出的密钥:
在文本编辑器中打开%UserProfile%\Documents\StuckRects3.reg
,例如VS 代码,改变二进制值。 文件输出将类似于:Windows Registry Editor Version 5.00 [HKCU\some\registry\keys\binary\output] @=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\ 00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\ 4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\ 00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,\ 22,00,25,00,31,00,22,00,00,00
- 导入修改后的密钥: (PowerShell 变量)
Reg Import "$ENV:UserProfile\Documents\StuckRects3.reg"