Hi Nathan,

First, I'm not positive, but I don't think existkey sets the @error macro. It is a function. You should set a variable to it and test the variable.

$returncode=ExistKey("HKEY_LOCAL_MACHINE/...")
If $returncode=0
? "Hey, my key is alive!"
Else
? "No stinking key!"
Endif

Another thing to be careful of is that existkey, at least in my experience, only checks for the existence of keys. It will not check for the existence of a value. Make sure what you are looking for is a key. If it is a value, you can try to read the value, or use enumvalue.

Also, on NT, you probably don't want to shell to c:\command.com. Just to make sure someone hasn't installed a workstation with a non-standard winnt directory, I use:
$comd="@LANROOT\cmd.exe /c "

Hope that helps.

Regards,

Brad Van Orden