HKLMSoftwareWow6432Node默认情况下,在64位OS上的32位应用程序将查看该节点。要读取密钥的64位版本,您需要指定
RegistryView:
using (var hklm = RegistryKey.OpenbaseKey(RegistryHive.LocalMachine, RegistryView.Registry64))using (var key = hklm.OpenSubKey(@"SOFTWAREMicrosoftWindowsCurrentVersionUninstall")){ // key now points to the 64-bit key}.NET 4.0中已添加了用于执行此操作的API。如果您仍在使用3.5,则需要使用P /
Invoke来访问64位密钥:http :
//www.rhyous.com/2011/01/24/how-read-
the-64-bit从32位应用程序注册或反之亦然/



