Replace RegKeyValue with RegQueryValueEx which works on Windows XP.