How to differentiate Windows 8.1 Update 1 from Windows 8.1?

9

4

Is there anyway to differentiate these two definitively?

I realize I can look for a taskbar or power button on the Start Screen, but I'm more interested in knowing if there's anywhere that actually displays 8.1 Update 1. I know MS has this page, but a programmatic way of detecting it would be nice, especially as the latest ISOs have the update slipstreamed in.

As far as I can tell, the output of ver and wmic os are the same between Windows 8.1 and Windows 8.1. Update 1, and the System Properties still reports Windows 8.1.

ernie

Posted 2014-04-15T18:59:14.793

Reputation: 5 938

1You don't. You have to check if the specific Windows Update knowlebase that is "Update 1" is installed. I don't have the number handy its well documented. – Ramhound – 2014-04-15T19:01:05.083

2@Ramhound That only works for systems that were upgraded from 8.1 . . . ISOs on MSDN are now Windows 8.1 with Update, and don't have the Windows Update in their history . . . – ernie – 2014-04-15T19:03:22.483

I don't have Windows 8.1, but I guess the build number should be different after the update. Did you check the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion registry key? – and31415 – 2014-04-15T19:09:30.223

2@and31415 the build version is reported in the ver output (6.3.9600), and is the same for both. The problem I'm trying to solve is just knowing what systems we have in our lab, and what OS they're running . . . for full test coverage, we want to keep both 8.1 and 8.1 with Update 1 – ernie – 2014-04-15T19:12:46.357

1@ernie What about the values stored in the registry location above? If you want to check whether the update is installed you could use something like this: wmic qfe get hotfixid | findstr /i /c:"KB2919355" – and31415 – 2014-04-15T20:36:11.160

2@and31415 I should have been more explicit. Both the ver output and the registry info are identical. The wmic/findstr method seems like it'll work (even on systems that were installed from the new ISOs), though it's ugly as sin (especially since it's basically going to be a secondary check after a ver check) . . . post that as an answer and I'll accept it . . . – ernie – 2014-04-15T21:19:03.870

2@Ramhound I understand you can't update it, but we test software here, and just like we've got users who are still running XP without service packs, we assume we'll have users with 8.1 without having updated. We need comprehensive coverage to make sure our software works in all environments, and having wide breadth of systems is important to us. – ernie – 2014-04-15T21:20:12.153

Alright I understand; I was just trying to avoid needless work on your part; check the IE11 version IE11 was updated I am pretty sure. – Ramhound – 2014-04-15T21:28:43.807

Answers

6

Possible solutions

Below there's a few batch scripts which can check whether the operating system is Windows 8.1, with or without KB2919355. The exit code will be one of the following:

  • 0: Windows 8.1
  • 1: Windows 8.1 Update (KB2919355 installed)
  • 2: Not Windows 8.1

Batch script A - Update check

This is the most reliable way. The script first checks if the operating system is Windows 8.1 by comparing the version with 6.3.9600. Then all installed updates are queried to verify whether the KB2919355 update was installed already.

@echo off

for /f "usebackq tokens=2 delims==" %%G in (
`wmic os get version /value ^| findstr /c:"="`
) do set version=%%~G

if not "%version%" == "6.3.9600" exit /b 2

wmic qfe get hotfixid | findstr /i /c:"KB2919355" >nul
set /a errorlevel=%errorlevel% ^^ 1

exit /b %errorlevel%

Batch script B - Build version check

As an alternative you could check the Windows build version, which is faster then the first script because you don't need to enumerate all updates. Since it uses a registry value, it might not be as reliable.

@echo off

for /f "usebackq tokens=2 delims==" %%G in (
`wmic os get version /value ^| findstr /c:"="`
) do set version=%%~G

if not "%version%" == "6.3.9600" exit /b 2

for /f "tokens=4 delims=. " %%G in (
'"reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "BuildLabEx" | findstr /i /c:"REG_SZ" "'
) do set /a build=%%~G

if %build% geq 17031 exit /b 1
exit /b 0

Batch script C - Build version check (Internet Explorer)

Just like the previous script, here the concept is similar except the Internet Explorer (IE) version is checked instead.

@echo off

for /f "usebackq tokens=2 delims==" %%G in (
`wmic os get version /value ^| findstr /c:"="`
) do set version=%%~G

if not "%version%" == "6.3.9600" exit /b 2

for /f "tokens=3,6 delims=. " %%G in (
'"reg query "HKLM\SOFTWARE\Microsoft\Internet Explorer" /v "svcVersion" | findstr /i /c:"REG_SZ" "'
) do set /a major=%%~G & set /a build=%%~H

if %major% equ 11 if %build% geq 17031 exit /b 1
if %major% geq 12 exit /b 1
exit /b 0

Note The script assumes that any IE version higher or equal to 12 to be available on a Windows 8.1 system with update KB2919355 installed.

All future security and nonsecurity updates for Windows RT 8.1, Windows 8.1, and Windows Server 2012 R2 require this update to be installed. We recommend that you install this update on your Windows RT 8.1, Windows 8.1, or Windows Server 2012 R2-based computer in order to receive continued future updates.

Source: Windows RT 8.1, Windows 8.1, and Windows Server 2012 R2 Update: April 2014

Given the above, it's reasonable to think any newer IE version would require the update as a prerequisite, just like SP2 is required to install IE 9 on Windows Vista.

and31415

Posted 2014-04-15T18:59:14.793

Reputation: 13 382

1I am happy that my idea about checking the version IE11 was a possible solution. – Ramhound – 2014-04-17T11:43:56.403

@Ramhound I've improved the old script. Checking the IE version has some caveats, and I've updated the answer to clarify that. – and31415 – 2014-04-17T13:14:23.197

3

Parse the BuildLabEx string

reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" | findstr BuildLabEx

and if the number is larger than 17031 the users have the Update 1 installed.

magicandre1981

Posted 2014-04-15T18:59:14.793

Reputation: 86 560

BuildLab is not updated; BuildLabExe is. – Jeroen Wiert Pluimers – 2014-04-17T11:10:54.650

@magicandre1981 - Which is exactly what this query script checks. – Ramhound – 2014-04-17T11:44:58.350

The initial sentence talks about BuildLab. My comment explains the difference between the two, as the Ex portion of BuildLabEx is hidden in the default 100% text magnification of the script. – Jeroen Wiert Pluimers – 2014-04-17T12:23:58.850

0

We use a command line utility called WuInstall (http://www.wuinstall.com) that does some useful things around patching, among them enabling batch scripts to check whehe updates are installed

Command line to show all installed updates

WUInstall.exe /search /criteria "IsInstalled=1" /offline

To check if a certain KB is installed (there are many filtering options) you can check:

WUInstall.exe /search /criteria "IsInstalled=1" /offline /match "KB982214"

The utility does some command line output, which can be redirected to an xml file with an option called /xmlout or just redirected to a file with e.g. >out.txt

MacDonkey

Posted 2014-04-15T18:59:14.793

Reputation: 76

-1

I simply check for a "winstore" folder in the Windows as I have noticed that is a blatant difference in all versions of windows.

Can even run command WinStore to see it.

REM Simulating OS check :Install c: cd\ if exist "c:\windows\WinStore" goto WIN8

:Win8 REMspecific code for a win8 machine

PowerTrip

Posted 2014-04-15T18:59:14.793

Reputation: 1

1I'm guessing you're saying that's for Windows8 verses non-Windows 8. This question was specifically for Win8.1 v. Win8.1 Update 1 – ernie – 2014-09-05T20:34:37.990