I've been playing around with some registry manipulation on an X64 system and am finding some odd things as well.

With AlternateRegView OFF, all registry functions work as expected, but write to the WOW6432Node part of the registry. I can create a key, write, modify, and delete values, delete keys, and delete the entire tree.

With AlternateRegView ON, however, things get a bit funky.
  • WriteValue: works, writing in the 64b part of the registry. Both create and modify work.
  • DelValue: works - the value is removed as expected
  • KeyExist: works - reports the presents/absence of the key
  • EnumKey: works - can enumerate the keys that exist
  • EnumValue: works - can enumerate values that exist in a key
  • DelKey: fails - I cannot delete a key at all, it reports Error 2 - not found.
  • DelTree: Partially fails - it appears to delete the entire tree contents, but does not remove the root of the key. It then reports an error 2 - not found.
Obviously, this only affects scripts running on 64-bit systems, but we're finding more and more of them, so the problem will only become worse.

It seems that some of the code between DelKey and DelTree is shared. DelKey won't work at all against the 64b registry - seems like it's not honoring the AlternateRegView setting. DelTree succeeds in deleting all subkeys and values, but then fails when trying to remove the root of the key path. If it's calling the same logic as DelKey, it makes sense that it would fail to delete and report Error 2.

I have tested with Kix 4.60 and 4.61 with identical results. I'd like some others here to confirm my results. If it is confirmed, we can open a bug report.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D