The Repair Windows Image context menu option is a powerful tool that detects and troubleshoots system image corruption with just a few clicks. The shortcut executes a Deployment Imaging Service and Management Tool (DISM) on demand, enabling IT admins to remediate system issues much faster.
This guide explores how to add the Repair Windows Image context menu to your workforce’s computers, as well as best practices and common troubleshooting solutions.
Step-by-step guide to add the entry and repair Windows image
Take note that you need administrator privileges to add, remove, and use the “Repair Windows Image” context menu option.
Method 1: Using Registry Editor
⚠️This method involves modifying the Windows Registry, so before you proceed, create a backup.
- Press Win + R, type regedit, and click Enter.
- When prompted by User Account Control, click Yes.
- Using the Registry Editor’s address bar, navigate to the following path:
HKEY_CLASSES_ROOT\Directory\Background\shell
- Right-click on the shell key in the right-hand pane and select New > Key.
- Name the new key Repair Windows Image.
- Right-click on Repair Windows Image key and select New > String Value.
- Name the new key MUIVerb.
- Double-click MUIVerb to modify its value.
- In the Value field, type
Repair Windows Image
. - Right-click on Repair Windows Image key and select New > Key.
- Name the key command.
- Double-click on (Default) to modify its value.
- In the Value field, type the following command:
powershell.exe -Command "Start-Process DISM -ArgumentList '/Online','/Cleanup-Image','/RestoreHealth' -Verb RunAs"
- Click OK.
Method 2: Using .reg file
You can create a .REG file with a script that immediately adds the context menu option to a workstation via PowerShell. Here’s how:
- Open the Notepad app.
- In a blank file, paste the following script:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\RepairWindowsImage]
@="Repair Windows Image"
"Icon"="imageres.dll,-102"
"Position"="Bottom"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\RepairWindowsImage\command]
@="powershell.exe -Command \"Start-Process DISM -ArgumentList '/Online','/Cleanup-Image','/RestoreHealth' -Verb RunAs\""
- Save the file and name it Add_RepairWindowsImage_ContextMenu.reg.
- In the “Save as type:” dropdown, select All files.
- Click on Save.
- Go to its file location and run the .REG file to add the context menu option.
- If prompted by User Account Control, click Yes.
How to Remove the Context Menu Entry
⚠️You need administrator privileges to add, remove, and use the “Repair Windows Image” context menu option.
A decluttered menu helps streamline operations and prevent accidents. To remove the repair Windows image context menu option, do the following:
- Press Win + R, type regedit, and click Enter.
- When prompted by User Account Control, click Yes.
- Using the Registry Editor’s address bar, navigate to the following path:
HKEY_CLASSES_ROOT\DesktopBackground\Shell
- Delete the RepairWindowsImage registry key.
- Click Apply, then OK.
Best practices and considerations
Here are some useful tips to maximize the “Repair Windows Image” context menu option.
Test first
Simulate your DISM in a test environment before implementing it system-wide via Group Policy Objects (GPO). Doing so will confirm whether your script works as intended and save you the heartburn of troubleshooting issues post-rollout.
Run with internet access
Run a DISM online to download the necessary files directly from Windows servers. This guarantees a more thorough troubleshooting process since the tool can access updated components, making your repair attempts as robust as possible.
Use in environments with update restrictions
Repair corrupted or missing system files by assigning a trusted local directory if Windows Update is blocked/you lack a stable internet connection. The DISM will use this folder as a repair source and the files within to service the workstation’s system image.
To set a local repair source, use the /source parameter in your command, like so:
Dism /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows
Monitor DISM logs
Review the log file’s detailed output to refine your search. After executing the DISM, all commands, results, and possible errors are recorded in the DISM log, making it a valuable list of insights.
To check your DISM log, head to %windir%\Logs\DISM\dism.log.
🛑| Strengthen operational resilience with the DISM recovery command tool.
Read NinjaOne’s guide on how to use the DISM command for Windows Image deployment.
Troubleshooting the Repair Windows Image context menu option
Adding the “Repair Windows Image” context menu option involves advanced tools and low-level settings, so you might run into some road bumps. Here are the most common problems and how to fix them:
No admin prompt appears
If you don’t see the admin prompt appear on screen, your Registry Editor wasn’t launched with administrator privileges. Here’s how to resolve this:
Run an elevated Registry Editor
- Press Win + R to open the Run dialog.
- Type
regedit
. - Press Ctrl + Shift + Enter to run it as an administrator.
Verify User Account Control (UAC) settings
It’s possible that your UAC isn’t configured to notify when changes are made to the workstation. To check, do the following:
- Press Win + R to open the Run dialog.
- Type
control
and press Enter. - Navigate to User Accounts > Change User Account Control settings.
- Adjust the controls to notify you when apps try to make changes to your computer.
- Click on OK.
- If prompted by the UAC, click on Yes.
DISM fails to restore health
If your DISM command doesn’t resolve the system errors, try these troubleshooting tips:
- Check your Internet connection: DISM uses Windows Update to source repair components by default, and an unstable connection could disrupt repair efforts.
- Specify a local repair source: Designating a specific folder that holds repair files for your offline DISM is a worthwhile alternative.
- Run an elevated DISM: Open the Command Prompt as an administrator, enter the following command, and press Enter:
Dism.exe /online /cleanup-image /RestoreHealth
- Check the PC’s DISM logs: Get detailed output and error messages to confirm whether DISM works properly.
Entry doesn’t appear
If the “Repair Windows Image” context menu option isn’t appearing, try these possible solutions:
- Verify Registry entries: The keys should be held in HKEY_CLASSES_ROOT\DesktopBackground\Shell\Repair Windows Image.
- To restart Windows Explorer, Open the Task Manager (Ctrl + Shift + Esc), scroll down, right-click on Windows Explorer, and select Restart.
- Check for conflicting entries: Other entries in the computer’s Registry might be overriding the “Repair Windows Image” context menu option.
Fast-track maintenance with the “Repair Windows Image” context menu item
The “Repair Windows Image” context menu option provides quick access to a maintenance tool that remediates Windows image corruption. Adding this to your IT admin’s toolkit helps streamline tech support, lowers the risk of downtime, and provides immediate means to check system health.