我想通过.Net从Windows Update API获取LastInstallationSuccessDate和LastSearchSuccessDate。我可以得到IAutomaticUpdates2.Results,但其中包含的这两个属性为空。为什么他们的日期不像文档状态?为什么WUApiLib.AutomaticUpdates Results.WUApiLib.AutomaticUpdates为空?
class Program
{
static void Main(string[] args)
{
WUApiLib.IAutomaticUpdates2 auc = new WUApiLib.AutomaticUpdates();
Console.WriteLine(auc.Results.LastInstallationSuccessDate);
Console.WriteLine(auc.Results.LastSearchSuccessDate);
}
}
它正在使用Windows 7 x64,但不能在Windows XP x86上使用。 –
我会猜测WUApiLib支持仅限于Vista和更高版本。 –
在这个网站的简单搜索让我发现这个讨论:http://stackoverflow.com/questions/5690615/c-sharp-windows-update-api-wuapilib –