If you know exactly what it is, you can just merge it into the registry with one little change. Example:
Windows Registry Editor Version 5.00
-[HKEY_LOCAL_MACHINE\SOFTWARE\Adaptec]
"Notray"="False"
The difference being the - in front of the registry tree.
You can import a reg file from the command line like this: regedit /i test.reg
As far as finding particular text, you would have to export registry entries and then parse them for particular words, recreate the entries without the words and then import them. It can all be done via batch file, but it's a bear. Recommended reading:
This guy
This is just from a batch file perspective. I'm sure there's a much easier way with VB, and probably a decent way with KIX32, but I only care for the archaic methods.