I've run into a problem with ENUMVALUE() on Win 95 machines. I wrote the script on Win2k and it tests out fine on Win2k as well. I clipped the section of code that's giving me grief below.
<snip>
;-----------------------------------------------------------------------------------
; Find and remove 'Machine Debug Manager' from RunServices key
$Index = 0
:Loop1
$ValueName = ENUMVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices\", $Index)
If @ERROR = 0
? "Name found: $ValueName"
If $ValueName = "Machine Debug Manager"
$ReturnCode = DelValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices", "Machine Debug Manager")
If $ReturnCode = 0
? "$ValueName deleted"
goto Done
Endif
Endif
$Index = $Index + 1
goto Loop1
Endif
;-----------------------------------------------------------------------------------
one
</snip>

The problem is ENUMVALUE()returns nothing. This I deduced through debug and remmed lines. @ERROR returns 0. $ValueName is blank.

Any ideas?

------------------
Laziness is the mother of invention

Les Ligetfalvy

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