When you regread() a default value ( RegRead( <regkey>,"") ), but the default value has no value set (Appears in regedit as Name: "(Default)", Type: "REG_SZ", Data: "(value not set)" ), regread will error out. Is this expected behavior? It very well might be... just want to know Reproducer: Test 1 will pass because it has a value... Test 2 will fail because there is no value set: $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir") If @er