使用Microsoft Ultimate Wisdom,他们已经更改了注册表中的更新位置。我可以从Windows2003服务器上获取更新,没有问题。只是Windows 7已经不再流行了:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall任何人都有其他方法得到它。最好是用C#或使用WMI?
上帝用他们的智慧拯救微软
发布于 2010-03-09 20:23:47
对于Windows7 64位,它是HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Updates格式
发布于 2011-06-28 11:04:48
private string GetX64Installedsoftware()
{
string Software = null;
string SoftwareKey = @"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall";
Software += "\r\nWINDOWS X64 Software\r\n\r\n\r\n ";
using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(SoftwareKey))
{
if (rk == null)
{
return Software;
}
foreach (string skName in rk.GetSubKeyNames())
{
using (RegistryKey sk = rk.OpenSubKey(skName))
{
try
{
if (!(sk.GetValue("DisplayName") == null))
{
if (sk.GetValue("InstallLocation") == null)
Software += sk.GetValue("DisplayName") + " - Install path not known \r\n ";
else
Software += sk.GetValue("DisplayName") + " - " + sk.GetValue("InstallLocation") + "\r\n ";
}
}
catch (Exception ex)
{
}
}
}
}
return Software;
}https://stackoverflow.com/questions/2407120
复制相似问题