功能隨選安裝Features On Demand

概觀Overview

功能隨選安裝 (FOD) 是可隨時新增的 Windows 功能。Features on Demand (FODs) are Windows features that can be added at any time. 常見功能包含手寫辨識等語言資源,或 .NET Framework (.NetFx3) 等其他資源Common features include language resources like handwriting recognition or other features like the .NET Framework (.NetFx3). 當 Windows 10 或 Windows Server 需要新功能時,可以從 Windows Update 要求功能套件。When Windows 10 or Windows Server needs a new feature, it can request the feature package from Windows Update.

您也可以預先安裝 FOD,使用者需要時就已準備就緒。You can also preinstall FODs so they're ready if a user needs them. FOD 會以 .cab 檔案的形式散發於功能隨選安裝 ISO,而您可以使用 DISM 將 FOD 新增至 Windows 映像。FODs are distributed as .cab files on the Feature on Demand ISO and you can use DISM to add a FOD to a Windows image. 如果您使用 FOD ISO 來預先安裝 FOD,請確定您使用的是符合您 Windows 映像版本的 FOD ISO。If you're using the FOD ISO to preinstall FODs, make sure you're using the FOD ISO that matches your Windows image version.

注意

在安裝更新之前,請依序新增語言套件、FOD 和應用程式。Add language packs, FODs, and apps, in that order, prior to installing an update. 如果您在新增語言套件、FOD 和應用程式之前新增更新,則必須重新安裝更新。If you add an update prior to adding language packs, FODs, and apps you'll have to reinstall the update.

功能隨選安裝類型Types of Features on Demand

從 Windows 10 版本 1809 和 Windows Server 2019 開始,Windows 提供兩種不同的功能隨選安裝類型:Starting with Windows 10, version 1809 and Windows Server 2019, Windows has two different types of Features on Demand:

  • 沒有附屬套件的 FOD:將所有語言資源封裝到相同套件中的 FOD。FODs without satellite packages: FODs with all language resources packaged into the same package. 這些 FOD 是以單一 .cab 檔案的形式散發。These FODs are distributed as a single .cab file.

    您可使用 DISM /Add-Capability/Add-Package 來新增這些 FOD。They can be added using either DISM /Add-Capability or /Add-Package.

  • 具有附屬套件的 FOD:在個別的套件 (附屬套件) 中具有語言和/或架構資源的非語言相關 FOD。FODs with satellite packages: Language-neutral FODs that have language and/or architecture resources in separate packages (satellites). 當您安裝這種類型的 FOD 時,只會安裝適用於 Windows 映像的套件,以減少磁碟使用量。When you install this type of FOD, only the packages that apply to the Windows image are installed, which reduces disk footprint. 這些 FOD 是以一組多個 .cab 檔案的形式散發,但是藉由指定單一 /capabilityname 來安裝。These FODs are distributed as a set of several .cab files, but are installed by specifying a single /capabilityname. 這些是 Windows 10 版本 1809 的新功能。These are new for Windows 10, version 1809.

    其只能使用 DISM /Add-Capability (而不是 /Add-Package) 來新增。They can only be added using DISM /Add-Capability (and not /Add-Package).

    具有附屬項目的 FOD 需要格式正確的 FOD 存放庫。FODs with satellites require a well-formed FOD repository. 這可以是 ISO 上的完整 FOD 存放庫,或是使用 DISM /export-source 建立的自訂存放庫。This can either be the full FOD repository on the ISO, or a custom repository created with DISM /export-source. 其無法藉由指向具有一些 FOD 檔案的目錄來新增,因為 DISM 需要其他中繼資料才能進行正確的連線。They cannot be added by pointing to a directory with a handful of FOD files hand-copied from the repository, because DISM requires additional metadata to make the right connections.

如需具有附屬項目的 FOD 詳細資訊,請參閱可用的功能隨選安裝See Available Features on demand for more information about which FODs have satellites. 語言 FOD 沒有附屬項目。Language FODs don't have satellites.

提示

雖然您可使用 /add-package 新增非附屬 FOD,但建議您使用 /add-capability 新增所有 FOD,因為您可將其用來新增附屬和非附屬 FOD。While you can add non-satellite FODs using /add-package, we recommend adding all FODs with /add-capability because you can use it to add both satellite and non-satellite FODs.

新增或移除功能隨選安裝Adding or removing Features on Demand

使用 DISM /add-package 來新增或移除 FODUsing DISM /add-package to add or remove FODs

您可以使用 DISM /add-package,將非附屬的功能隨選安裝新增至 Windows 映像。You can add non-satellite Features on demand to a Windows image with DISM /add-package. 您可以使用 /add-package 新增的 FOD 包括語言 FOD、Windows 預先安裝的 FOD,以及建議預先安裝的 FOD。The FODs that you can add with /add-package include the language FODs, the FODs that come preinstalled with Windows, and the FODs that we recommend for preinstallation.

OEM 通常可以使用 DISM /add-package 將 FOD 新增到其 Windows 映像,除非他們需要預先安裝具有附屬項目的 FOD。OEMs can generally add FODs to their Windows images using DISM /add-package, unless they need to preinstall a FOD that has satellites.

命令Command 說明Description 範例Example
/add-package/add-package 將套件 (包括 FOD .cab) 新增至映像。Adds a package, including a FOD .cab to an image. add-package 只能用來新增沒有附屬套件的 FOD。add-package can only be used to add FODs that don't have satellite packages. DISM.exe /image:C:\mount\Windows /add-package /packagepath:E:\Microsoft-Windows-Holographic-Desktop-FOD-Package~31bf3856ad364e35~amd64~~.cab
/Get-Packages/Get-Packages 取得映像中的所有套件清單。Get a list of all packages in an image. DISM /image:C:\Mount\Windows /get-packages
/Get-Packageinfo/Get-Packageinfo 取得映像中的套件資訊。Get information of a package in an image. DISM /image:C:\mount\Windows /get-packageInfo /packagename:Microsoft-Windows-Xps-Xps-Viewer-Opt-Package~31bf3856ad364e35~amd64~~10.0.17134.1000
/Remove-Package/Remove-Package 從映像中移除套件。Removes a package from an image. 注意:請勿移除其他套件相依的套件。Note: Don't remove a package that other packages depend on. 例如,如果您已安裝法文手寫和基本套件,就無法移除基本套件。For example, if you have the French handwriting and basic packages installed, don't remove the basic package. DISM.exe /image:C:\mount\Windows /Remove-Package /PackageName:Microsoft.Windows.Calc.Demo~6595b6144ccf1df~x86~en~1.0.0.0

使用 DISM/add-capability 來新增或移除 FODUsing DISM /add-capability to add or remove FODs

您也可以使用 DISM /add-Capability 來安裝 FOD。You can also install FODs with DISM /add-Capability. 您必須使用 /add-capability 來預先安裝附屬 FOD。You have to use /add-capability to preinstall satellite FODs. 如果您要在離線映像上預先安裝 FOD,請使用 /source 選項,告知 Windows 可尋找 FOD 安裝檔案的位置。If you're preinstalling a FOD onto an offline image, use the /source option to tell Windows where to find the FOD installation files. /source 可以是 FOD 存放庫或掛接的 FOD ISO。The /source could be a FOD repository or a mounted FOD ISO. 您可以在命令中使用多個 /source 引數。You can use multiple /source arguments in a command.

如果您要將 FOD 新增至線上映像,/add-capability 會從 Windows Update 下載功能,並將其新增至映像。If you're adding a FOD to an online image, /add-capability downloads features from Windows Update and adds them to the image. 如果您不想從 Windows Update 安裝,可以使用 /LimitAccess,其會告知 DISM 不檢查 Windows Update 或 Windows Server Update Services 是否有功能來源檔案。If you don't want to install from Windows Update, you can use /LimitAccess, which tells DISM to not check Windows Update or Windows Server Update Services for the capability source files.

如需詳細資訊,請參閱 DISM 功能套件服務命令列選項See DISM Capabilities Package Servicing Command-Line Options for more information.

  • 使用 /online選項,將功能新增至您的電腦。Use the /online option to add the capability to your PC.
  • 使用 /Image:\<mount path> 搭配 /source 選項,將功能新增至掛接的 Windows 映像。Use /Image:\<mount path> with the /source option to add the capability to a mounted Windows image.
命令Command 說明Description 範例Example
/add-capability/add-capability

將功能新增至映像。Adds a capability to an image.

對於具有相依性的套件,此命令也會提取相依套件。For packages with dependencies this also pulls dependent packages. 例如,如果您新增語音套件,除了語音以外,您也會取得文字轉換語音和基本套件。For example, if you add the Speech package, you'll also get the Text-to-speech and Basic packages in addition to Speech.

DISM 會在下列位置尋找來源檔案:DISM looks for source files in the following locations:
  1. 若已指定 /Source,DISM 會先查看指定的位置。If /Source is specified, DISM looks in the specified locations first.
  2. 若未指定 /Source,或在指定的位置找不到來源檔案,則 DISM 會檢查群組原則所指定的位置。If /Source is not specified, or if the source files are not found in the specified locations, DISM checks the locations specified by group policy.
  3. 如果仍找不到檔案,而 DISM 是針對線上映像執行,且若未指定 /LimitAccess,其會在 Windows Update 上尋找檔案。If the files still aren't found, and if DISM is running against an online image, and if /LimitAccess is not specified, it looks for the files on Windows Update.
DISM.exe /image:C:\mount\Windows /add-capability /CapabilityName:Language.Basic~~~en-US~0.0.1.0 /Source:E:

DISM.exe /Online /add-capability /CapabilityName:Language.Basic~~~en-US~0.0.1.0

/Get-Capabilities/Get-Capabilities 取得映像中的功能。Get capabilities in the image. DISM /image:C:\Mount\Windows /Get-Capabilities
/Get-CapabilityInfo/Get-CapabilityInfo 取得映像中的功能資訊。Get information of a capability in the image. DISM /image:C:\mount\Windows /Get-CapabilityInfo /CapabilityName:Language.Basic~~~en-US~0.0.1.0
/Remove-Capability/Remove-Capability

從映像中移除功能。Removes a capability from an image.

注意:您無法移除其他套用相依的功能。Note: You cannot remove a capability that other packages depend on. 例如,如果您已安裝法文手寫和基本功能,就無法移除基本功能。For example, if you have the French handwriting and basic capabilities installed, you can't remove the basic capability.

DISM.exe /image:C:\mount\Windows /Remove-Capability /CapabilityName:Language.Basic~~~en-US~0.0.1.0

若要查看各項功能的所有可用 DISM 命令,請參閱 DISM 功能套件服務命令列選項To see all available DISM commands for capabilities, see DISM Capabilities Package Servicing Command-Line Options.

相關主題Related topics