On an x64 machine, here is an example of how to access the 32-bit view of the registry:
using (var view32 = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser,
RegistryView.Registry32))
{
using (var clsid32 = view32.OpenSubKey(@"SoftwareClassesCLSID", false))
{
// actually accessing Wow6432Node
}
}
... as compared to...
using (var view64 = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser,
RegistryView.Registry64))
{
using (var clsid64 = view64.OpenSubKey(@"SoftwareClassesCLSID", true))
{
....
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…