Check to see that HKLM\SOFTWARE\Microsoft\Visual Basic\6.0 key does not have subkeys. (Knowing how bloated Microsoft and VB are, my guess is that there are). According to the Win32::Registry (Win32::TieRegistry as well) documentation, a key cannot be removed if it has subkeys. The subkeys will have to be removed first.