Hello,

I have a script that loops through a list of machine names and checks a registry key. It works fine for 99% of the machines, but on a few, I get a "fatal exception occurred" when it hits the "If Len" line below, and the script quits.

 Code:
$SROOTVAR = ReadValue($REMOTEMACHINE + "\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion","SystemRoot")
	If Len($SROOTVAR) > 2


If it can't see the key or it's otherwise empty, shouldn't it just return blank or 0? What about trying to find the length of $SROOTVAR could cause Kix to crash?

Thanks!