[Patch] regtool: Add load/unload commands and --binary option

Christian Franke Christian.Franke@t-online.de
Wed Jan 25 21:38:00 GMT 2006


Igor Peshansky wrote:

>>[snip]
>>    
>>
>
>I wonder if it would be better to use stdin/stdout for binary data (or
>even add a -f option for set).  IMHO,
>
>regtool -b get KEY1\\VALUE | regtool -b set KEY2\\VALUE
>
>or
>
>regtool -b get KEY1\\VALUE | regtool -b set -f - KEY2\\VALUE
>
>looks cleaner than storing the hex encoding into a string...  
>

At least when regtool is used interactively, it is IMO not very useful 
to have
modem-line-noise-like output for REG_BINARY, but human readable output for
the other value types.
But this is the current behavior of "regtool get ...".


Suggest to combine the best of both worlds:

regtool get KEY\\VALUE

should always produce human readable output, in particular a hex dump
for REG_BINARY.
(But this would change existing behavior on REG_BINARY)


regtool -b get KEY\\VALUE

writes REG_BINARY as binary data to stdout.


regtool -b set KEY\\VALUE 01 02 03

sets REG_BINARY value from hex bytes in args.


regtool -b set KEY\\VALUE -

set value from binary data read from stdin


>[...]
>
>
>That said, I also think this functionality would be very useful.
>  
>

Thx,

Christian



More information about the Cygwin-patches mailing list