Thanks Thor. I finally solved the issue by using RegDelNull. The "version" subkey contained embedded-null characters and that's why I was unable to delete it using regedit. But RegDelNull deleted it as explained here:
http://technet.microsoft.com/en-us/sysinternals/bb897448.aspx