>WSHShell = CREATEOBJECT("WScript.Shell") >ON ERROR DO errNoReg WITH -1 && registry key does not exist >lcRegDataPath = WSHShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\mycompany\myproduct\datapath") >IF UPPER(lcRegDataPath) = "HKEY_LOCAL_MACHINE\SOFTWARE\MYCOMPANY\MYPRODUCT\DATAPATH" THEN >DO errNoReg WITH -2 && registry key exists but is not set >ENDIF >strPath = ADDBS(UPPER(lcRegDataPath)) >ON ERROR && return to visual foxpro error handling >RELEASE WSHShell && release windows scripting object from memory >