This registry script writes a REG_NONE
empty value in the reg editor (which is represented as binary data):
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\keyname]
"valuename"=hex(0):
(the english translation of the data-description in the image above is: "zero-length binary value")
I need to reproduce the same in Batch (to improve a Reg2Bat converter), but when I try this:
REG ADD "HKCU\keyname" /V "valuename" /T "REG_NONE" /D "" /F
It adds data:
Maybe the reg.exe command is not compatible with the REG_NONE
valuetype? (the command help says its a supported value but... you see)
How I could really add a REG_NONE
empty value?
00 00
(terminating null of a Unicode string) even if/D "..."
is not specified on command line.REG ADD "HKCU\Key Name" /V "Value Name" /T REG_NONE /F
should do the job, but definitely does not which could be interpreted as bug of REG worth being reported to Microsoft. – Plenitude