5

I'd like to detect from a C# application whether the latest Windows 8.1 Update (KB 2919355) is installed

I haven't been able to find anything on any of microsoft's sites or via google that indicates how one might do this.

Thanks!

Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431
Orion Edwards
  • 121,657
  • 64
  • 239
  • 328

3 Answers3

2

That update is actually a "rollup" or a collection of other separate smaller updates. If you go to the Knowledge base page for the update and scroll down to the "File information" you can see the update is actually the combination of the following other updates.

  • KB2919442
  • KB2919355
  • KB2932046
  • KB2937592
  • KB2938439
  • KB2934018

You will then need to either check that all of the above listed updates are applied or the single master update is applied. I am not sure how to do that in C# alone but via the commandline you can just do it by the console command

wmic qfe get hotfixid | find "KB2919355"
Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431
  • Interesting that our lists don't match. Also, from the linked page: "You can also use the DISM command to verify the installation or uninstallation of the update." – Ben Voigt Apr 28 '14 at 21:15
  • @BenVoigt DISM requires a elevated prompt, the WMI method can do it without eleveating (I removed the part about checking DLL versions as using DISM or WMI is a much better way to do it). – Scott Chamberlain Apr 28 '14 at 21:18
0

I installed Windows 8.1 Update from an MSDN download before it went live on Windows Update. It was distributed as a series of MSU files with a ReadMe. The list of updates in the ReadMe may be useful, if you choose to detect their presence.

Windows 8.1, Windows Server 2012 R2, Windows RT 8.1 Update

Recommended Install Order
1.  KB2919442
2.  KB2919355
3.  KB2932046
4.  KB2937592
5.  KB2938439
6.  KB2949621
Ben Voigt
  • 277,958
  • 43
  • 419
  • 720
  • The 6th KB number does not point to [a valid KB page](http://support.microsoft.com/kb/2949621), perhaps the ReadMe is wrong, it does show a different number for that last package on the KB page for the KB2919355 update (however [visiting it](http://support.microsoft.com/kb/2934018) redirects you back to the KB2919355 page). – Scott Chamberlain Apr 28 '14 at 21:21
  • @ScottChamberlain: The distribution of that update from MSDN included `Windows8.1-KB2949621-v2-x64.msu` Google suggests that one might only be applicable to Server SKUs. – Ben Voigt Apr 28 '14 at 21:48
0

This may be the culprit:

Operating system version changes in Windows 8.1 and Windows Server 2012 R2

Manifestation

In Windows 8.1, the GetVersion(Ex) APIs have been deprecated. That means that while you can still call the APIs, if your app does not specifically target Windows 8.1, you will get Windows 8 versioning (6.2.0.0).

Solution

In order to target Windows 8.1, you need to either include the app manifest or include _NT_TARGET_VERSION=$ (_NT_TARGET_VERSION_LATEST) in the source file.

Mode details of the required manifest contents are given in the article.

Bob77
  • 13,167
  • 1
  • 29
  • 37
  • 2
    He is not trying to detect 8.1 vs 8.0 but the difference between 8.1 with a patch and 8.1 without a patch. (however the patch may or may not change (I did not check) the build number in the windows version number so it may still work) – Scott Chamberlain Apr 28 '14 at 21:27