Tipped off by a post elsewhere on this BBS that referred to a utility called REGMON from
www.sysinternals.com , I discovered that the means might exist to write a utility I've been searching for.
I just had a peek at the open-source code for Regmon, and I think it can be done. I just don't have the tool (NuMega's VtoolsD and the Microsoft DDK) to modify the SYS/VXD portions of this project.
Here's the tool I'm thinking of writing: Instead of being called REGMON, it would be called REGBLOCK. The user would feed it a pointer to a hand-created list of parent registry keys. For example:
Hkey_Local_Machine/Software/SomeKey/SomeKey
Hkey_Current_User/Software/SomeKey/SomeKey
...and any requests to read or write keys in those trees or under those trees would fail with a "key does not exist" error. But not permanently, only for as long as the blocker was running.
It looks like this is do-able, because REGMON fully hooks the system calls that read/write the registry. It seems to do it fairly cleanly, using a SYS/VXD combination on Windows NT.
Most or all of the complex user interface of REGMON could be thrown away (which is too bad, as it's the only portion of the project that I can modify and compile) in favor of a pure command-line driven utility that simply activated/deactivated the SYS/VXD hooks and pointed to the configuration file.
Anyone interested in playing with this?