日期:2014-05-18 浏览次数:20996 次
RegistryKey hklm = Registry.LocalMachine; RegistryKey uninstall = hklm.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"); foreach (string site in uninstall.GetSubKeyNames()) { RegistryKey sitekey = uninstall.OpenSubKey(site); if (sitekey == null) { Console.WriteLine(sitekey + "-----" + "IS NULL"); continue; } foreach (string s in sitekey.GetValueNames()) { Console.WriteLine(site + "-----" + s + ":" + sitekey.GetValue(s));//在这里获得大小和使用频率 } }