This tutorial will show you how to add a "Repair Windows Image" component store context menu in Windows 10 and Windows 11.
If a Windows image becomes unserviceable, you can use the DISM (Deployment Imaging and Servicing Management) tool or Repair-WindowsImage cmdlet to update the files and correct the problem.
For example, to fix Windows image component store corruption when a sfc /scannow command is unable to repair corrupted or modified system files because the component store (source) is corrupted. SFC should be able to repair the files afterwards.
The Repair Windows Image desktop context menu allows you to quickly check and repair the Windows image component store on demand as needed.
The Check Health of Windows Image item in the context menu will run the
Dism /Online /Cleanup-Image /CheckHealth
command to only check whether the image has been flagged as corrupted by a failed process and whether the corruption can be repaired. This is just a quick way to see if corruption currently exists, and to inform you if there is corruption. This does not fix anything or create a log. This will finish running almost instantly.The Repair Windows Image item in the context menu will run the
Dism /Online /Cleanup-Image /RestoreHealth
command to scan the image for component store corruption, perform repair operations automatically, and records that corruption to the "C:\Windows\Logs\DISM\dism.log" log file. This can take around 10-15 minutes up to a few hours to finish depending on the level of corruption. It will stay at 20% for a while before continuing. An Internet connection is required for "Repair Windows Image".You must be signed in as an administrator to add, remove, and use the "Repair Windows Image" context menu.
EXAMPLE: Repair Windows Image context menu
In Windows 11, you will need to click/tap on Show more options first by default, then click/tap on Repair Windows Image.
Here's How:
1 Do step 2 (add) or step 3 (remove) below for what you want.
2 Add "Repair Windows Image" Context Menu
A) Click/tap on the Download button below to download the file below, and go to step 4 below.
Add_Repair_Windows_Image_context_menu.reg
Download
(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\RepairWindowsImage]
"Icon"="imageres.dll,-5374"
"MUIVerb"="Repair Windows Image"
"Position"="Bottom"
"Extended"=-
"SubCommands"=""
[HKEY_CLASSES_ROOT\DesktopBackground\shell\RepairWindowsImage\shell\001menu]
"HasLUAShield"=""
"MUIVerb"="Check Health of Windows Image"
[HKEY_CLASSES_ROOT\DesktopBackground\shell\RepairWindowsImage\shell\001menu\command]
@="PowerShell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/s,/k, Dism /Online /Cleanup-Image /CheckHealth' -Verb runAs\""
[HKEY_CLASSES_ROOT\DesktopBackground\shell\RepairWindowsImage\shell\002menu]
"HasLUAShield"=""
"MUIVerb"="Repair Windows Image"
[HKEY_CLASSES_ROOT\DesktopBackground\shell\RepairWindowsImage\shell\002menu\command]
@="PowerShell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/s,/k, Dism /Online /Cleanup-Image /RestoreHealth' -Verb runAs\""
3 Remove "Repair Windows Image" Context Menu
This is the default setting.
A) Click/tap on the Download button below to download the file below, and go to step 4 below.
Remove_Repair_Windows_Image_context_menu.reg
Download
(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\DesktopBackground\Shell\RepairWindowsImage]
4 Save the .reg file to your desktop.
5 Double click/tap on the downloaded .reg file to merge it.
6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.
7 You can now delete the downloaded .reg file if you like.
That's it,
Shawn Brink
Attachments
Last edited: