James Hawkins truiken@gmail.com writes:
I agree with you that SHDeleteKey does work, but we can't always be sure that it won't break in the future, and for testing purposes we assume that RegDeleteKey does work because it is outside of the current shreg tests. If for some reason SHDeleteKey breaks in the future (which things do break), we won't have other tests failing because SHDeleteKey is broken. It's a part of the current batch of shreg tests, so we shouldn't use it for things we want to always work.
There's no reason not to use SHDeleteKey, if it's broken then the test will fail anyway, and SHDeleteKey is not more likely to get broken than RegDeleteKey or other registry functions.