>
> Reading the source code, ClassesRoot is opened as writable – have you
> tried just calling DeleteSubKeyTree on it?
>

I have figured out what went wrong last week.

I originally had a string of permission failures because I forgot to
call OpenSubKey
with writable: true. Once I fixed those stupid mistakes I hit another error
on the HKCR root delete and I didn't read the message properly and assumed
it was a permission failure. Today I see the message is:

System.InvalidOperationException: Registry key has subkeys and recursive
removes are not supported by this method.

I had accidentally used DeleteSubKey instead of DeleteSubKey*Tree* and
didn't read the error message. I blame intellisense first and me second.

*Greg*

P.S. I haven't done any COM work for 10 years and I forgot how messy it is.
I confirmed today my old suspicion that a regasm for a simple C# class
creates dozens of registry entries in different branches, and although an
inverse /unregister does remove a lot of keys, it does not remove the
typelib and interface keys. So a regasm slowly pollutes the registry,
slightly, if that matters.

Reply via email to