Error message: REGFIND: May not specify -n with -r
I can find all values that are EditFlags, but AFAIK, I can't delete'em
or rename the data to "" (only that between the quotes).
I misunderstood you. You don't want to replace values but unknown
values for known value names. This cannot be done with MS Regfind.
There is a (somewhat more complicated, but OTOH safer) workaround.
Get another Regfind utility from here:
www.intsoft.com/products/regfind
It can't replace by itself. But you can use it to get a list of key
and value pairs with your search string:
regfind -value "EditFlags" > clearEF.reg
After that, you have to convert clearEF.reg to the needed format.
Use your favorite editor with RegEx or use Sed from here:
http://unxutils.sourceforge.net
The syntax is those:
sed -i "s/^\([^ ]\+\)/[\1/;s/^ /\x22/;s/ [0-9]\{4\}\/[0-9]\{2\}\/[0-9]\{2\} [0-9]\{2\}\:[0-9]\{2\}$/]/;s/ = [^=]*$/\x22=-/;1i\REGEDIT4" clearEF.reg
or:
sed -i "s/^\([^ ]\+\)/[\1/;s/^ /\x22/;s/ [0-9]\{4\}\/[0-9]\{2\}\/[0-9]\{2\} [0-9]\{2\}\:[0-9]\{2\}$/]/;s/ = [^=]*$/\x22=\x22\x22/;1i\REGEDIT4" clearEF.reg
The first (containing the "=-" string) will delete the value, while the
second (with "=\x22\x22") will just set the value to an empty string.
Execute one of the above from an cmd prompt (which should provide a
long enough input buffer) or split your favorite one-liner to multiple
lines and run them from a batch. Splitting is done on semicolons:
sed -i "s/^\([^ ]\+\)/[\1/" clearEF.reg
sed -i "s/^ /\x22/;s/ [0-9]\{4\}\/...
:
Check the resulting clearEF.reg file for unwanted entries! (That's the
part when the "safety net" gets to work.) After that, double click on
clearEF.reg to incorporate the changes into the Registry.
Now everything should look as you like it. ;-)
BeAr