In MSBuild 3.5, the $(Registry:FOO) syntax was added to let you reference registry values in an MSBuild file.
However, devenv.exe has remained a 32 bit executable for numerous reasons (http://blogs.msdn.com/b/ricom/archive/2009/06/10/visual-studio-why-is-there-no-64-bit-version.aspx). As a result If I want to look at $(Registry:HKEY_LOCAL_MACHINE\Software) I actually get $(HKEY_LOCAL_MACHINE\Wow6432Node\Software). I've worked around this issue with the MsBuild Community Extensions, http://msbuildextensionpack.codeplex.com/ but its very arkward.
If I run msbuild from a x64 vcvars32.bat environment, the 64 bit msbuild.exe causes the proper registry key to be read.