[Patch] regtool: Add load/unload commands and --binary option
Wed Jan 25 14:14:00 GMT 2006
On Wed, 25 Jan 2006, Corinna Vinschen wrote:
> On Jan 24 21:00, Christian Franke wrote:
> > Hi,
> > the attached patch adds commands "load" and "unload" and options "-b,
> > --binary" to regtool.
> > Load a registry hive from PATH into new SUBKEY:
> > regtool load KEY\SUBKEY PATH
> > Unload and remove SUBKEY later:
> > regtool unload KEY\SUBKEY
> > Print REG_BINARY value as hex:
> > regtool -b get KEY\VALUE
> > Set REG_BINARY value from hex args:
> > regtool -b set KEY\VALUE XX XX XX XX ...
> > [snip]
> > Thanks for any comment
> Thanks for this patch, it looks pretty useful.
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
regtool -b get KEY1\\VALUE | regtool -b set -f - KEY2\\VALUE
looks cleaner than storing the hex encoding into a string... If you want
a hex dump,
regtool -b get KEY1\\VALUE | od -t x1
will do it. I'm not aware of any program that does the reverse
(hex dump->binary), but writing a perl script for that is trivial.
That said, I also think this functionality would be very useful.
|\ _,,,---,,_ firstname.lastname@example.org | email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"
More information about the Cygwin-patches