Skip to content
Permalink
Browse files

Merge remote-tracking branch 'remotes/origin/MP1-4952_Fix_Windows_Upd…

…ate_timestamp_logging' into MP1-1.22-Full_test
  • Loading branch information...
owlsroost committed Apr 10, 2019
2 parents b362ab1 + 24b4638 commit 0a6d32171ae002158065636a54b39139e193f7ab
@@ -807,13 +807,21 @@ public static DateTime GetLastInstalledWindowsUpdateTimestamp()
var session = new UpdateSession();
var updateSearcher = session.CreateUpdateSearcher();
updateSearcher.Online = false;
updateSearcher.ServerSelection = (ServerSelection)2; //ssWindowsUpdate = 2
int count = updateSearcher.GetTotalHistoryCount();
if (count < 1)
{
return DateTime.MinValue;
}
var history = updateSearcher.QueryHistory(0, count);
for (int i = 0; i < count; ++i)
for (int i = 0; (i < count) && (i < 50); ++i)
{
if ((history[i].ResultCode == OperationResultCode.orcSucceeded) &&
(!history[i].Title.Contains("Security Essentials")) &&
(!history[i].Title.Contains("Windows Defender")))
// if ((history[i].ResultCode == OperationResultCode.orcSucceeded) &&
// (!history[i].Title.Contains("Security Essentials")) &&
// (!history[i].Title.Contains("Windows Defender")))
// return history[i].Date;

if (history[i].ResultCode == OperationResultCode.orcSucceeded)
return history[i].Date;
}
}
@@ -178,7 +178,7 @@ public static void Main(string[] arguments)
{
Log.Info("---- SetupTv v" + versionInfo.FileVersion + " is starting up on Windows 10 Pro for Workstations (???)");
}
Log.Info(OSInfo.OSInfo.GetLastInstalledWindowsUpdateTimestampAsString());
//Log.Info(OSInfo.OSInfo.GetLastInstalledWindowsUpdateTimestampAsString());
Log.Info("Windows Media Player: [{0}]", OSInfo.OSInfo.GetWMPVersion());

//Check for unsupported operating systems
@@ -927,7 +927,7 @@ public void OnStart()
Log.WriteFile("TVService v" + versionInfo.FileVersion + " is starting up on Windows 10 Pro for Workstations (???)");
}

Log.Info(OSInfo.OSInfo.GetLastInstalledWindowsUpdateTimestampAsString());
//Log.Info(OSInfo.OSInfo.GetLastInstalledWindowsUpdateTimestampAsString());
Log.Info("Windows Media Player: [{0}]", OSInfo.OSInfo.GetWMPVersion());

// Warn about unsupported operating systems
@@ -75,7 +75,7 @@ public Startup(string[] arguments)
{
Log.Info("Main: Configuration v" + versionInfo.FileVersion + " is starting up on Windows 10 Pro for Workstations (???)");
}
Log.Info(OSInfo.OSInfo.GetLastInstalledWindowsUpdateTimestampAsString());
//Log.Info(OSInfo.OSInfo.GetLastInstalledWindowsUpdateTimestampAsString());
Log.Info("Windows Media Player: [{0}]", OSInfo.OSInfo.GetWMPVersion());
#if DEBUG
Log.Info("Debug build: " + Application.ProductVersion);
@@ -752,7 +752,7 @@ public static void Main(string[] args)
catch {
Log.Info("Main: MediaPortal v" + versionInfo.FileVersion + " is starting up on Windows 10 Pro for Workstations (???)");
}
Log.Info(OSInfo.OSInfo.GetLastInstalledWindowsUpdateTimestampAsString());
//Log.Info(OSInfo.OSInfo.GetLastInstalledWindowsUpdateTimestampAsString());
Log.Info("Windows Media Player: [{0}]", OSInfo.OSInfo.GetWMPVersion());

#if DEBUG

0 comments on commit 0a6d321

Please sign in to comment.
You can’t perform that action at this time.