Dela via


Configure a Windows Repair Source

A repair source is a location that's used to restore Windows optional features, enable Windows optional features, or repair a corrupted Windows image.

You can use Windows Update or a set of files as a repair source.

For more information, see Repair a Windows Image.

Choose a Repair Source

Windows Update is the default repair source, but you can configure Group policy to specify one or more network locations that have the files required to restore a Windows feature or repair a corrupted operating system.

Use Windows Update to restore optional features and repair Windows images

  1. Windows Update is used by default if it's allowed by the policy settings on the computer.

  2. You can configure Windows Update as a backup repair source. If you're using Windows Update as a primary or backup repair source, make sure your firewall is configured to allow access to Windows Update.

Use files a source

As an alternative to using Windows Update, you can use the following as a source:

  • Mounted image

    You can use a mounted Windows image from a WIM file as a source to restore optional features and repair a corrupted operating system. For example, c:\mount\Windows. For more information about capturing a Windows image as a WIM file, see Capture Images of Hard Disk Partitions Using DISM.

  • Running Windows installation

    You can use a running Windows installation as a source to restore optional features by sharing the c:\Windows folder on your network.

  • Side by side (SxS) folder

    You can use a Windows side-by-side folder from a network share or from a removable media, such as Windows installation media, as the source of the files. For example, z:\sources\SxS.

  • WIM file

    You can use a Windows image (.wim) file on a network share as a source to restore optional features. You must specify the index of the Windows image in the .wim file that you want to use and you must use a Wim: prefix in the path to identify this file format. For example, to specify index 3 in a file named contoso.wim, type: Wim:\\network\images\contoso.wim:3.

Note

When specifying a source:

  • Only use RTM media regardless of whether the source is a WIM or a mounted Windows image. Refresh media has older file versions excluded from the media and the target operating system may need these files.
  • Make sure the source is patched to the latest Cumulative Update. If the target OS is patched to a higher level than the source, adding features or repairing Operating Systems may fail because the target OS needs updated files that are not present in the source.
  • When using DISM's /RestoreHealth command, you can specify one these locations using the /Source option. See DISM Operating system command-line options for more information.

Use Group Policy to set your preferred repair source

You can use Group Policy to configure your preferred repair souce.

Configure Group Policy for Feature on Demand

  1. Open the group policy editor. For example, on a computer that is running Windows 10, from the Start screen, type Edit Group Policy, and then select Edit Group Policy to open the Group Policy Editor.

  2. Click Computer Configuration, click Administrative Templates, click System, and then double-click the Specify settings for optional component installation and component repair setting.

  3. Select the settings that you want to use for Features on Demand.

Maintaining a Repair Source

If you don't use Windows Update as the repair source for features and automatic corruption repair, consider the following guidelines for maintaining a repair source.

Servicing updates

Keep any repair source current with the latest servicing updates. If you're using an image from a WIM file for features, you can use DISM to service the image. For more information, see Mount and Modify a Windows Image Using DISM. If you're using an online Windows installation shared on your local network as a repair image, make sure that the computer has access to Windows Update.

Multilingual images

You must include all of the relevant language packs with your repair source files for the locales your image supports. If you try to restore a feature without all of the language components that the Windows installation requires for that feature, the installation will fail.

You can install additional language packs after a feature is restored.

What is DISM?

Enable or Disable Windows Features Using DISM

Repair a Windows Image

DISM Operating System Package Servicing Command-Line Options