The Windows Features dialog box (
optionalfeatures.exe) lets you add or remove additional or optional Windows features. For instance, you can remove Media Features → Windows Media Player using the Windows Features (“Turn Windows Features On Or Off”) dialog box if you no longer plan to use WMP.
Sometimes, the “Turn Windows Features On Or Off” box may be completely empty.
Or, it may stall with the message “Please wait…” as if it got stuck during the enumeration of components.
If the optional Windows features list doesn’t populate even after waiting for several minutes, here is how to fix the problem.
[Fix] Turn Windows Features On Or Off is Blank
Step 1: Start the Windows Modules Installer service
- Press WinKey + R to open the Run dialog
services.mscand press ENTER. This will open the Services console.
- Double-click Windows Modules Installer service.
- Set its Start type to Automatic.
- If the Windows Modules Installer service is not running, click the Start button to start it.
Step 2: Run the System File Checker
The System File Checker is used to scan for missing or corrupted system files and restore them from the component store.
- Open an elevated Command Prompt window.
- Type the following command and hit ENTER:
If SFC is unable to restore the missing or corrupt system files due to component store corruption, proceed to Step 3.
Step 3: Repair the Component Store using DISM
Run the following command to repair the component store on Windows 10/11:
On Windows 7 and earlier, you used the System Update Readiness tool to fix the corruption of system files or component store. On Windows 8, 10, and 11, we use DISM for that purpose.
- From the elevated Command Prompt window, type the following command:
DISM /Online /Cleanup-image /Restorehealth
Wait for the operation to complete. This command repairs the Component Store if any corruption is found.
(If the above steps don’t help, you can run the DISM command mentioning the source image (fresh Windows 10/11 Install.wim) from the mounted ISO or DVD media matching the same Windows 10/11 build your system is running.)
Run DISM with the “/Source” argument, if needed
If you encounter an error when running the above command, try running it with the “
/source” argument. For more information, check out the article Repair Windows 10/11 Using DISM and SFC. Follow these steps:
- Download Windows 10/11 ISO and double-click to mount it.
- Note down the drive-letter for the mounted ISO — e.g.,
- Get the indexes available in the WIM file, by running this command:
dism /get-wiminfo /wimfile:"G:\sources\install.wim"
(For more information on the indexes of a WIM file, check out this article.)
- Let’s say Index #6 in the WIM file is “Windows 10/11 Professional Edition”, then run this command:
dism /Online /Cleanup-Image /RestoreHealth /Source:wim:G:\Sources\Install.wim:6
That’s it! DISM should have restored all the missing packages (
*.cat files) inside the “
Servicing\Packages” folder and other folders.
The Windows Features dialog should now be functional!
Step 4: Delete the orphaned Package Name in the registry
As a last resort, you may delete the problematic/missing package reference in the registry.
OptionalFeatures.exeand close it.
- Open the
- Look for the most recent set of entries, matching the date or timestamp. The
CBS.logfile should reveal the problem component/package, as in the following example:
2022-08-07 16:52:08, Info CBS Session: 30976591_4001857438 initialized by client Windows Optional Component Manager, external staging directory: (null), external registry directory: (null) 2022-08-07 16:52:08, Info CBS Appl: Evaluating package applicability for package Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.19041.1, applicable state: Installed 2022-08-07 16:52:08, Info CBS External EvaluateApplicability, package: Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.19041.1, package applicable State: Installed, highest update applicable state: Installed, resulting applicable state:Installed 2022-08-07 16:52:08, Info CBS Enumerating Foundation package: Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.19041.1, this could be slow 2022-08-07 16:52:08, Info CBS Store corruption, manifest missing for package: Microsoft-Windows-IIS-WebServer-ServerCommon-Package~31bf3856ad364e35~amd64~~10.0.19041.1826 2022-08-07 16:52:08, Error CBS Failed to resolve package 'Microsoft-Windows-IIS-WebServer-ServerCommon-Package~31bf3856ad364e35~amd64~~10.0.19041.1826' [HRESULT = 0x800f0831 - CBS_E_STORE_CORRUPTION] 2022-08-07 16:52:08, Info CBS Mark store corruption flag because of package: Microsoft-Windows-IIS-WebServer-ServerCommon-Package~31bf3856ad364e35~amd64~~10.0.19041.1826. [HRESULT = 0x800f0831 - CBS_E_STORE_CORRUPTION] 2022-08-07 16:52:08, Info CBS Failed to resolve package [HRESULT = 0x800f0831 - CBS_E_STORE_CORRUPTION] 2022-08-07 16:52:08, Info CBS Failed to check whether this is the real child: Microsoft-Windows-IIS-WebServer-ServerCommon-Package~31bf3856ad364e35~amd64~~10.0.19041.1826 [HRESULT = 0x800f0831 - CBS_E_STORE_CORRUPTION] 2022-08-07 16:52:08, Info CBS Failed to enumerate updates from child package [HRESULT = 0x800f0831 - CBS_E_STORE_CORRUPTION] 2022-08-07 16:52:08, Info CBS Failed to enumerate updates from child package [HRESULT = 0x800f0831 - CBS_E_STORE_CORRUPTION] 2022-08-07 16:52:08, Error CBS Failed to enumerate all updates. [HRESULT = 0x800f0831 - CBS_E_STORE_CORRUPTION]
It’s now clear that the following package (missing) is the root cause of the Windows Features blank window issue:
- Launch the Registry Editor (
regedit.exe) and go to the package key here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Microsoft-Windows-IIS-WebServer-ServerCommon-Package~31bf3856ad364e35~amd64~~10.0.19041.1826
(Note: The name of the registry key is exactly the same as the missing package name, as shown in CBS.log)
- First, export the key to a registry (.reg) file.
- Right-click on the key and choose Delete.
Alternatively, you can change the
CurrentStateregistry value (for the above problematic package) to
0, instead of deleting the key. The value data of
0for this item means the package is “Absent”. This prevents the Windows Features dialog from enumerating the item.
See this article to know more about the
- Repeat the same for every missing component (mentioned in the
CBS.logfile), if any.
- Exit the Registry Editor.
Launch the Windows Features dialog now.
Step 5: Delete the “StoreDirty” registry value (Windows 8)
If you’re using Windows 8, run this command. This command may not be necessary (or the Components branch be missing) if using Windows 10/11.
- Open an elevated command prompt, type the following, and hit ENTER:
reg delete HKLM\COMPONENTS /v StoreDirty
I hope that fixes the Windows Features (“Turn Windows Features on or off”) dialog in Windows 10 and 11.