How to Get the Windows Feature Experience Pack Version in Batch Script
In recent versions of Windows 10 and 11, Microsoft has introduced "Windows Feature Experience Packs." This technology allows Microsoft to update specific system features, like the Snipping Tool, the touch keyboard, and parts of the shell, independently of the major OS build. For developers and IT professionals, knowing the specific version of the Experience Pack is becoming just as important as knowing the OS build number itself, especially when troubleshooting UI inconsistencies or checking for feature compatibility.
This guide explains how to extract the Experience Pack version using the Windows Registry.
What is a Feature Experience Pack?
The Experience Pack is a collection of features that are updated via the Microsoft Store or Windows Update. It allows for faster iteration of the Windows "Shell" without requiring a full OS reboot for every small change.
Key benefits of tracking the version:
- UI Troubleshooting: Identifying if a user is missing a specific Shell improvement.
- Reporting: Including the "Full" version string in a system health audit.
- Compatibility: Ensuring your Batch automation doesn't rely on a UI element that hasn't been "experienced" yet by the current pack version.
The version information for the Experience Pack is stored in a publicly readable registry key. You do not need to be an administrator to retrieve this string.
Method 1: Using the Registry Query (Best Practice)
The most reliable way to find this version is by querying the CBS (Component Based Servicing) package identity in the registry, which stores the currently installed Experience Pack version string.
Core Script Logic
@echo off
setlocal EnableDelayedExpansion
echo [PROCESS] Querying Windows Feature Experience Pack...
:: Query the CBS package registry for the Experience Pack version
set "EP_VER="
set "CBS_PATH=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages"
for /f "delims=" %%k in ('reg query "%CBS_PATH%" 2^>nul ^| findstr /i "UserExperience-Desktop"') do (
for /f "tokens=4 delims=~" %%v in ("%%k") do set "EP_VER=%%v"
)
if "!EP_VER!"=="" (
echo [INFO] Experience Pack data not found.
echo [INFO] This system may not support Feature Experience Packs.
echo [TIP] Run "winver" to check manually.
) else (
echo [SUCCESS] Experience Pack Version: !EP_VER!
)
pause
Method 2: Using PowerShell from Batch
On systems where the CBS registry path varies, you can call PowerShell to retrieve the Experience Pack version directly from the system's appx packages.
@echo off
echo [PROCESS] Querying Experience Pack via PowerShell...
powershell -NoProfile -Command "Get-AppxPackage -Name 'MicrosoftWindows.Client.CBS' 2>$null | Select-Object -ExpandProperty Version"
pause
Creating a System Audit Script
A professional script should combine the OS build number with the Experience Pack version to give a complete picture of the machine's state.
@echo off
setlocal EnableDelayedExpansion
echo ============================================================
echo Detailed Windows Version Auditor
echo ============================================================
:: 1. Get OS Build
set "BUILD="
for /f "tokens=2 delims==" %%i in ('wmic os get BuildNumber /value 2^>nul ^| find "="') do (
for /f "delims=" %%j in ("%%i") do set "BUILD=%%j"
)
:: 2. Get Display Version (e.g., 23H2)
set "K=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
set "DV="
for /f "tokens=2,*" %%a in ('reg query "%K%" /v "DisplayVersion" 2^>nul ^| findstr /i "DisplayVersion"') do set "DV=%%b"
:: 3. Get Experience Pack version from CBS packages
set "EP_VER="
set "CBS_PATH=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages"
for /f "delims=" %%k in ('reg query "%CBS_PATH%" 2^>nul ^| findstr /i "UserExperience-Desktop"') do (
for /f "tokens=4 delims=~" %%v in ("%%k") do set "EP_VER=%%v"
)
:: 4. Output the results
echo Operating System: !DV! (Build !BUILD!^)
if "!EP_VER!"=="" (
echo Experience Pack: Not detected
) else (
echo Experience Pack: !EP_VER!
)
echo ============================================================
pause
Common Pitfalls and How to Avoid Them
Missing Keys on Older Versions
Windows Feature Experience Packs were introduced later in the Windows 10 lifecycle. If you run this script on an older version (like 1809), the registry keys will simply not exist.
Wrong Way:
:: Expecting the key to always be there
echo %EP_VER%
Correct Way:
Always use an IF check or redirection (2>nul) to handle missing keys without throwing ugly errors back to the user.
Path Variations
Microsoft occasionally shifts where these identifiers are stored as they refine the "Unified Update Platform" (UUP).
If your Batch script can't find the Experience Pack version in the registry, advise your users to run the winver command. The Experience Pack is listed at the bottom of the "About Windows" window, allowing for manual verification.
Best Practices for OS Identification
- Use for Bug Reports: When reporting a UI bug, always include the Experience Pack version, as the bug might be fixed in a pack update before it is fixed in an OS build update.
- Combine with Store Checks: Since the pack is technically a "Component," you can also check its status using the
dismtool. - Auditing: If you are an IT admin, save these strings to a central database to track how quickly experience packs are rolling out across your network.
Note that the Experience Pack is sometimes referred to as the "Composited OS Version." Both terms refer to the same set of independent UI updates.
Conclusion
Retrieving the Windows Feature Experience Pack version via Batch script is an advanced but necessary step for modern Windows administration. By identifying this specific version string alongside the standard OS build number, you can create a far more precise profile of a machine's current state and UI capabilities. This professional approach to system identification ensures that your automation and troubleshooting routines are fully informed by the latest modular updates, providing a more reliable and cutting-edge experience for both administrators and end-users alike.