/
/

How to Add a “Repair Windows Image” Option to the Context Menu in Windows 10

How to Add a “Repair Windows Image” Option to the Context Menu in Windows 10 blog banner image

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.

  1. Press Win + R, type regedit, and click Enter.
  2. When prompted by User Account Control, click Yes.
  3. Using the Registry Editor’s address bar, navigate to the following path:

HKEY_CLASSES_ROOT\Directory\Background\shell

  1. Right-click on the shell key in the right-hand pane and select New > Key.
  2. Name the new key Repair Windows Image.
  3. Right-click on Repair Windows Image key and select New > String Value.
  4. Name the new key MUIVerb.
  5. Double-click MUIVerb to modify its value.
  6. In the Value field, type Repair Windows Image.
  7. Right-click on Repair Windows Image key and select New > Key.
  8. Name the key command.
  9. Double-click on (Default) to modify its value.
  10. In the Value field, type the following command:

powershell.exe -Command "Start-Process DISM -ArgumentList '/Online','/Cleanup-Image','/RestoreHealth' -Verb RunAs" 

  1. 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:

  1. Open the Notepad app.
  2. 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\""

  1. Save the file and name it Add_RepairWindowsImage_ContextMenu.reg.
  2. In the “Save as type:” dropdown, select All files.
  3. Click on Save.
  4. Go to its file location and run the .REG file to add the context menu option.
  5. 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:

  1. Press Win + R, type regedit, and click Enter.
  2. When prompted by User Account Control, click Yes.
  3. Using the Registry Editor’s address bar, navigate to the following path:

HKEY_CLASSES_ROOT\DesktopBackground\Shell

  1. Delete the RepairWindowsImage registry key.
  2. 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

  1. Press Win + R to open the Run dialog.
  2. Type regedit.
  3. 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:

  1. Press Win + R to open the Run dialog.
  2. Type control and press Enter.
  3. Navigate to User Accounts > Change User Account Control settings.
  4. Adjust the controls to notify you when apps try to make changes to your computer.
  5. Click on OK.
  6. 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.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).