How to delete the wrong key - upgrade Windows 7 premium to ultimate

Problem:

When I tried to upgrade from Premium to Ultimate using Windows Upgrade Anywhere, I entered a wrong key. After that, the UI does not allow me to re-enter the key anymore. It is back to Premium for each restart.

Solution: 

Edit the regedit:

HKey_Current_User\Software\Microsoft\Windows\CurrentVersion\WindowsAnytimeUpgrade

You will find the wrong key there and delete the ProductKey REG_SZ