Sorry, just rising to the challenge of your limited scope. You never said it had to be bulletproof.

Keeping with the @Error method, someone wrote a one line UDF that clears @Error with an EXIT 0. Useful for times like this.

This works too but processes an IF on every LOOP.
Code:
Break on
$i = 0
$KeyName = 'dummy'
While $KeyName
If $i
?"Name found: $KeyName"
EndIf
$i=$i+1
$KeyName = EnumKey("HKEY_CURRENT_USER\Software\",$i)
Loop

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.