查找所有已安装的软件及安装目录
在注册表下
RegistryKey hklm_currentUser_32 = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry32);
RegistryKey hklm_currentUser_64 = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64);
RegistryKey hklm_localMachine_32 = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32);
RegistryKey hklm_localMachine_64 = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall")
读取子节点的:
DisplayName
DisplayVersion
InstallDate
Publisher
InstallLocation
UninstallString