就是说REG2Au3吧。。。(个人认为)
b比如文本是:Windows Registry Editor Version 5.00
;添加键
[HKEY_CURRENT_USER\Software\["a-b"= 'a-b']]
;添加默认项
@="Default"
;添加字符串项
"\"a-b\"="="\"a!@#$%^&*()_+-=[]{};'\\:\"|,./<>?b\"="
;删除项
"DelMe"=-
;删除键
[-HKEY_CURRENT_USER\Software\["a-b"= 'a-b']]
;其他键值测试
[HKEY_CURRENT_USER\Software\[123]]
@=""
"字符串值"="字符串"
"DWORD值"=dword:12345678
"二进制值"=hex:31,32,33,34,35,36,37,38,39,30
"可扩展字符串值"=hex(2):ef,53,69,62,55,5c,57,5b,26,7b,32,4e,00,00
"多行字符串值"=hex(7):57,5b,26,7b,32,4e,31,00,00,00,57,5b,26,7b,32,4e,32,00,00,00,57,\
5b,26,7b,32,4e,33,00,00,00,57,5b,26,7b,32,4e,34,00,00,00,00,00
;错误行测试
[HKEYHKEY_CURRENT_USER\Software\[123]]
@=""
"字符串值"="字符串"
"DWORD值"=dword:12345678
;错误行测试
[HKEY_CURRENT_USER\Software\[123]]
@='Default'
"字符串值"="字符串"字符串
"DWORD值"=dword:1234567890
"二进制值"=hex:31,32,33,34,35,36,37,38,39,30,0 ,0 ,00, 000, 0, 00
"可扩展字符串值"=hex(2):ef,53,69, 62, 55,5c,57, 5b,26,7b,32,4e,00,00,0 ,0 ,0 ,00 ,00 ,0 ,0
"多行字符串值"=hex(7):57,5b,26,7b, 32,4e,31,00,00,00,57, 5b,26, 7b, 32, 4e,32,00,00,00,57,\
5b,26,7b,32,4e,33,00,00, 00,57,5b,26,7b, 32,4e,34,00,0,0,0,00, 0 , 0 ,0 , 00 , 0
"二进制值"=hex:zz,zz,zz,zz,zz,31,32,33,34,35,36,37,38,39,30
"可扩展字符串值"=hex(2):zz,zz,zz,zz,zz,ef,53,69,62,55,5c,57,5b,26,7b,32,4e,00,00
"多行字符串值"=hex(7):zz,zz,zz,zz,zz,57,5b,26,7b,32,4e,31,00,00,00,57,5b,26,7b,32,4e,32,00,00,00,57,\
5b,26,7b,32,4e,33,00,00,00,57,5b,26,7b,32,4e,34,00,00,00,00,00
Au3是:;添加键
RegWrite("HKEY_CURRENT_USER\Software\[""a-b""= 'a-b']")
;添加默认项
RegWrite("HKEY_CURRENT_USER\Software\[""a-b""= 'a-b']", "", "REG_SZ", "Default")
;添加字符串项
RegWrite("HKEY_CURRENT_USER\Software\[""a-b""= 'a-b']", """a-b""=", "REG_SZ", """a!@#$%^&*()_+-=[]{};'\:""|,./<>?b""=")
;删除项
RegDelete("HKEY_CURRENT_USER\Software\[""a-b""= 'a-b']", "DelMe")
;删除键
RegDelete("HKEY_CURRENT_USER\Software\[""a-b""= 'a-b']")
;其他键值测试
RegWrite("HKEY_CURRENT_USER\Software\[123]")
RegWrite("HKEY_CURRENT_USER\Software\[123]", "", "REG_SZ", "")
RegWrite("HKEY_CURRENT_USER\Software\[123]", "字符串值", "REG_SZ", "字符串")
RegWrite("HKEY_CURRENT_USER\Software\[123]", "DWORD值", "REG_DWORD", "0x12345678")
RegWrite("HKEY_CURRENT_USER\Software\[123]", "二进制值", "REG_BINARY", "31323334353637383930")
RegWrite("HKEY_CURRENT_USER\Software\[123]", "可扩展字符串值", "REG_EXPAND_SZ", "可扩展字符串")
RegWrite("HKEY_CURRENT_USER\Software\[123]", "多行字符串值", "REG_MULTI_SZ", "字符串1" & @LF & "字符串2" & @LF & "字符串3" & @LF & "字符串4")
;错误行测试
; Error - [HKEYHKEY_CURRENT_USER\Software\[123]]
; Error - @=""
; Error - "字符串值"="字符串"
; Error - "DWORD值"=dword:12345678
;错误行测试
RegWrite("HKEY_CURRENT_USER\Software\[123]")
; Error - @='Default'
; Error - "字符串值"="字符串"字符串
; Error - DWORD值=REG_DWORD:1234567890
; Error - 二进制值=REG_BINARY:31,32,33,34,35,36,37,38,39,30,0 ,0 ,00, 000, 0, 00
; Error - 可扩展字符串值=REG_EXPAND_SZ:ef,53,69, 62, 55,5c,57, 5b,26,7b,32,4e,00,00,0 ,0 ,0 ,00 ,00 ,0 ,0
RegWrite("HKEY_CURRENT_USER\Software\[123]", "多行字符串值", "REG_MULTI_SZ", "字符串1" & @LF & "字符串2" & @LF & "字符串3" & @LF & "字符串4" & @LF & & @LF )
; Error - 二进制值=REG_BINARY:zz,zz,zz,zz,zz,31,32,33,34,35,36,37,38,39,30
; Error - 可扩展字符串值=REG_EXPAND_SZ:zz,zz,zz,zz,zz,ef,53,69,62,55,5c,57,5b,26,7b,32,4e,00,00
; Error - 多行字符串值=REG_MULTI_SZ:zz,zz,zz,zz,zz,57,5b,26,7b,32,4e,31,00,00,00,57,5b,26,7b,32,4e,32,00,00,00,57,5b,26,7b,32,4e,33,00,00,00,57,5b,26,7b,32,4e,34,00,00,00,00,00 |