Enable or Disable Windows Features Offline

To enable or to disable Windows features in an offline Windows image, create an unattended installation answer file in Windows System Image Manager (Windows SIM) and use it as input for Package Manager.

You must install the latest version of the Windows OEM Preinstallation Kit (Windows OPK), which contains all the tools required, including Windows SIM and Package Manager.

To Enable or Disable Windows Features Offline

  1. In Windows SIM, open an existing catalog by right-clicking Select a Windows Image or Catalog file and specifying the catalog file type (.clg) in the drop down list, or create a new catalog by clicking Create Catalog on the Tools menu.

  2. Expand the catalog in the Windows Image pane, and then expand Packages.

  3. Expand Foundation, and right-click Microsoft-Windows-Foundation-Package.

  4. Click Add to Answer File.

  5. Click Enabled or Disabled next to the features that you intend to enable or disable. Click the arrow to select the opposite.
    You might need to expand an item to see all its children. The parent must be enabled if any of its children are enabled.

  6. Click Tools on the main menu, and click Validate Answer File.

  7. Correct any errors that appear in the Messages pane, and save the answer file.

  8. Mount the offline Windows image.
    For details on how to mount an image, see the Mount and Modify an Image topic.

  9. At a command prompt, run the following command.

    start /w pkgmgr /o:"<boot drive>\;<path to Windows folder>" /n:<path to answer file>
    
  10. When Package Manager returns, type the following command and look at the return code.

    echo %ERRORLEVEL%
    

    A return code of 0 indicates success.

  11. Commit changes and unmount the image.
    For details, see the Mount and Modify an Image topic.

Note

For details about Package Manager command-line options, see the Package Manager Command-Line Options topic.

See Also

Concepts

Maintenance How-To Topics
Servicing an Image
Windows System Image Manager Technical Reference
Package Manager Technical Reference