Enable or Disable Windows Features Online

To enable or to disable Windows features in an online 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.

To Enable or Disable Windows Features Online

  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 then 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. At a command prompt, run the following command.

    start /w pkgmgr /n:<path to answer file>
  9. When Package Manager returns, type the following command and look at the return code.

    echo %ERRORLEVEL%

    A return code of 0 indicates success.


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

See Also


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