設定階段如何運作How Configuration Passes Work

設定階段是 Windows®安裝的階段,您可以在其中自訂映射。Configuration passes are the phases of a Windows® installation during which you can customize an image. 您可以根據所使用的設定,在一或多個設定階段中套用 Windows 自動安裝設定。Windows unattended installation settings can be applied in one or more configuration passes, depending on the setting you use. 瞭解設定回合執行的方式和時機對於開發 Windows 部署策略非常重要。Understanding how and when configuration passes run is very important in developing a Windows deployment strategy.

本主題內容:In this topic:

瞭解設定階段Understanding Configuration Passes

下圖顯示相對於不同部署工具的設定階段之間的關聯性。The following diagram shows the relationship between the configuration passes relative to the different deployment tools.

設定階段總覽

並非所有的設定階段都是在特定安裝的 Windows 中執行。Not all configuration passes run in a particular installation of Windows. 某些設定階段(例如 auditSystemauditUser)只有在您將電腦開機至 audit 模式時才會執行。Some configuration passes, such as auditSystem and auditUser, run only if you boot the computer to audit mode. 大部分 Windows 安裝程式自動安裝設定都可以新增至 specializeoobeSystem 設定階段。Most Windows Setup unattend settings can be added to either the specialize or the oobeSystem configuration pass. 其他設定階段在某些情況下也會很有用。The other configuration passes can also be useful in certain situations. 下表說明每個設定階段。The following table describes each of the configuration passes.

設定階段Configuration pass 說明Description 設定階段執行的時機Configuration pass runs when

windowsPEwindowsPE

windowsPE 設定階段期間,您可以自動執行安裝程式的許多層面。Many aspects of the installation process can be automated during the windowsPE configuration pass. 在此階段中,您可以設定:In this pass you can configure:

  • Windows PE 選項Windows PE options

    這些選項可以包括指定 Windows PE 記錄檔的位置,以啟用網路功能或 Windows PE 分頁檔。These options can include specifying the location of the Windows PE log file, which enables networking or a Windows PE page file.

  • Windows 安裝程式選項Windows Setup options

    這些選項可以包括指定要在目的地電腦上安裝和設定磁片的 Windows 映像。These options can include specifying the Windows image to install and configuring a disk on the destination computer.

在此設定階段期間,會在處理 windowsPE 設定階段中的設定之後,將 Windows 映像複製到目的地電腦。During this configuration pass, the Windows image is copied to the destination computer after the settings in the windowsPE configuration pass are processed.

如果您的 Windows PE 安裝需要開機關鍵驅動程式來存取本機硬碟或網路,請使用此設定階段將驅動程式新增至 Windows PE 驅動程式存放區,並反映所需的開機關鍵驅動程式。If your installation of Windows PE requires boot-critical drivers to access the local hard disk drive or a network, use this configuration pass to add drivers to the Windows PE driver store and to reflect the required boot-critical drivers

發生下列情況時:One of the following occurs:

  • 啟動 Windows 安裝程式媒體Booting the Windows Setup media

  • 從舊版 Windows 安裝開始 Windows 安裝程式Starting Windows Setup from a previous Windows installation

只有當您從 Windows PE 環境執行 Windows 安裝程式時,才會套用 Windows PE 選項。The Windows PE options are applied only when you are running Windows Setup from a Windows PE environment. 從 Windows PE 或先前的 Windows 安裝執行時,會套用 Windows 安裝程式選項。The Windows Setup options are applied when it runs from either Windows PE or a previous Windows installation.

offlineServicingofflineServicing

此設定階段用來將更新、驅動程式或語言套件套用至 Windows 映像。This configuration pass is used to apply updates, drivers, or language packs to a Windows image.

在 Windows 安裝程式期間,會將 Windows 映像套用至硬碟,並在重新開機電腦之前,將回應檔案的 offlineServicing 區段中的任何設定套用至該映射。During Windows Setup, the Windows image is applied to a hard disk and any settings in the offlineServicing section of an answer file are then applied to that image before the computer reboots.

在此設定階段,您可以在映射啟動之前將驅動程式新增至 Windows 映像。During this configuration pass, you can add drivers to a Windows image before the image starts. 這可讓您在 Windows 安裝程式期間安裝和處理現成的設備磁碟機。This enables you to install and process out-of-box device drivers during Windows Setup.

此設定階段也可用來在服務案例期間,將更新套用至 Windows 映像。This configuration pass is also used to apply updates to a Windows image during servicing scenarios.

  • windowsPE 設定通過之後以及電腦重新開機之前自動完成。Automatically after the windowsPE configuration pass and before the computer reboots.

  • 當您使用部署映射服務與管理工具 ( # A0) 指定回應檔案時,在服務案例中。During servicing scenarios when you specify an answer file by using the Deployment Image Servicing and Management tool (Dism.exe).

specializespecialize

此設定階段用來建立和設定 Windows 映像中的資訊,而且是 Windows 映像所安裝之硬體的特定資訊。This configuration pass is used to create and configure information in the Windows image, and is specific to the hardware that the Windows image is installing to.

Windows 映像第一次開機後,就會執行 specialize 設定階段。After the Windows image boots for the first time, the specialize configuration pass runs. 在這段期間,會建立 (Sid) 的唯一安全識別碼。During this pass, unique security IDs (SIDs) are created. 此外,您還可以設定許多 Windows 功能,包括網路設定、國際設定和網域資訊。Additionally, you can configure many Windows features, including network settings, international settings, and domain information.

特殊化階段的回應檔案設定會出現在 audit 模式中。The answer file settings for the specialize pass appear in audit mode. 當電腦開機進入稽核模式時, auditSystem 階段會執行,而且電腦會處理 auditUser 設定。When a computer boots to audit mode, the auditSystem pass runs, and the computer processes the auditUser settings.

  • 當 Windows 映像第一次開機時自動啟動。Automatically when the Windows image boots for the first time.

  • 使用/generalize選項執行sysprep命令之後,請在下一次開機時進行。On the next boot after you run the sysprep command with the /generalize option.

一般化generalize

在此設定階段期間,會從 Windows 安裝中移除電腦特定的資訊,讓您能夠捕獲 Windows 映像並重新套用至不同的電腦。During this configuration pass, computer-specific information is removed from the Windows installation enabling you to capture and reapply the Windows image to different computers. 例如,在此階段期間,系統會從映射中移除唯一的安全識別碼 (SID) 、唯一的設備磁碟機,以及其他硬體特定的設定。For example, during this pass, the unique security ID (SID), unique device drivers, and other hardware-specific settings are removed from the image.

除了設定必須保存在主要映射上的其他 Windows 設定,此設定階段還可讓您以最低限度的方式設定 sysprep/generalize 命令。This configuration pass enables you to minimally configure the sysprep /generalize command, in addition to configuring other Windows settings that must persist on your master image.

一般化階段完成之後,下次 Windows 映像開機時,就會執行specialize設定階段。After the generalize pass finishes, the next time that Windows image boots, the specialize configuration pass runs. 如果您想要保留安裝到 Windows 安裝的唯一設備磁碟機,可以使用 Microsoft-windows-pnpsysprep | PersistAllDeviceInstalls 設定。If you want to retain the unique device drivers that are installed to your Windows installation, you can use the Microsoft-Windows-PnpSysprep | PersistAllDeviceInstalls setting. 如果已設定此設定,則不會從安裝中移除唯一設備磁碟機。If this setting is configured, unique device drivers are not removed from the installation.

  • 已設定下列設定: Microsoft-Windows-部署 | Generalize.The following setting is configured: Microsoft-Windows-Deployment | Generalize.

- 或 -- or -

  • 執行 sysprep/generalize 命令。Run the sysprep /generalize command.

auditSystemauditSystem

在此設定階段期間,當 Windows 在系統內容中執行時,會在使用者以 Aaudit 模式登入電腦之前處理設定。During this configuration pass, settings are processed when Windows is running in system context, before a user logs onto the computer in Aaudit mode.

這項傳遞通常用來對安裝進行其他設定,例如安裝現成的設備磁碟機。This pass is typically used to make additional configurations to an installation, such as installing out-of-box device drivers.

只有當電腦設定為開機至 audit 模式時,才會執行此行程。This pass runs only when a computer is configured to boot to audit mode.

  • 以下是已設定的自動安裝設定: Microsoft-Windows-部署 |重新封裝 | Mode = AuditThe following unattended Setup setting is configured: Microsoft-Windows-Deployment | Reseal | Mode=Audit.

- 或 -- or -

  • 使用/audit選項執行sysprep命令。Run the sysprep command with the /audit option.

auditUserauditUser

在使用者以 audit 模式登入電腦之後,此階段會處理自動安裝設定。This pass processes unattended Setup settings, after a user logs onto the computer in audit mode.

這項傳遞通常用來執行自訂命令或設定 Windows Shell 選項。This pass is typically used to run custom commands or configure Windows Shell options.

只有當電腦設定為開機至 audit 模式時,才會執行此行程。This pass runs only when a computer is configured to boot to audit mode.

  • 以下是已設定的自動安裝設定: Microsoft-Windows-部署 |重新封裝 | Mode = AuditThe following unattended Setup setting is configured: Microsoft-Windows-Deployment | Reseal | Mode=Audit.

- 或 -- or -

  • 使用/audit選項執行sysprep命令。Run the sysprep command with the /audit option.

oobeSystemoobeSystem

在此設定階段期間,設定會在 Windows 歡迎畫面啟動之前套用至 Windows。During this configuration pass, settings are applied to Windows before Windows Welcome starts.

這項傳遞通常用來設定 Windows Shell 選項、建立使用者帳戶,以及指定語言和地區設定。This pass is typically used to configure Windows Shell options, create user accounts, and specify language and locale settings.

OobeSystem階段的回應檔案設定會顯示在 Windows 歡迎畫面中,也稱為 OOBE。The answer file settings for the oobeSystem pass appear in Windows Welcome, also known as OOBE. 這些設定不會出現在 [audit] 模式中。These settings do not appear in audit mode.

  • 已設定下列設定: Microsoft-Windows-部署 | Reseal | Mode=OOBEThe following setting is configured: Microsoft-Windows-Deployment | Reseal | Mode=OOBE

- 或 -- or -

  • 使用/OOBE選項執行sysprep命令。Run the sysprep command with the /OOBE option.

如需可新增至回應檔案的 Windows 元件和設定的詳細資訊,請參閱《自動 Windows 安裝程式參考指南》。For more information about Windows components and settings that can be added to an answer file, see the Unattended Windows Setup Reference Guide. 如需記錄的詳細資訊,請參閱 部署疑難排解和記錄 檔,以及 Windows 安裝程式記錄檔和事件記錄檔。For more information about logging, see Deployment Troubleshooting and Log Files and Windows Setup Log Files and Event Logs.

設定設備磁碟機Configuring Device Drivers

若要在自動安裝期間新增現成的開機關鍵驅動程式,您必須確定預先安裝媒體上有開機關鍵驅動程式。To add out-of-box, boot-critical drivers during an unattended installation, you must make sure that the boot-critical driver is available on preinstallation media. 您應在 windowsPE 設定階段期間新增開機關鍵驅動程式。Boot-critical drivers should be added during the windowsPE configuration pass. 所有驅動程式都會暫存在驅動程式存放區中,但除了 Windows PE 映射之外,只有開機關鍵驅動程式會反映或安裝在離線 Windows 映像中。All drivers are staged in the driver store, but only boot-critical drivers are reflected or installed in the offline Windows image in addition to the Windows PE image. 非開機關鍵驅動程式可以新增至 offlineServicing 設定階段。Non-boot-critical drivers can be added to the offlineServicing configuration pass. 如此可確保開機關鍵驅動程式可供使用,而且當電腦開機時,驅動程式將會載入。This makes sure that boot-critical drivers are available and when the computer boots, the driver will load.

如需詳細資訊,請參閱 設備磁碟機和部署總覽For more information, see Device Drivers and Deployment Overview.

設定國際設定Configuring International Settings

國際設定可用於多個設定階段,可讓您根據客戶需求和不同的部署案例自訂 Windows 映像。International settings are available in multiple configuration passes, to enable you to customize the Windows image based on customer requirements and different deployment scenarios.

例如,如果您在美國組建電腦 (使用 en-US 國際設定),可能是以英文執行所有測試。For example, if you build a computer in the United States (which would be an en-US international setting), you might perform all your tests in English. 但是,如果您想要將電腦傳遞給法國,而且需要 Windows 以法文開機,您可以加入 fr-fr 語言套件(如果尚未安裝此語言套件),然後設定 Microsoft Windows-國際核心元件在 specialize 設定階段套用 fr-fr 設定。However, if you intend to deliver the computer to France and need Windows to boot in French, you can add the fr-FR language pack, if the language pack is not already installed, and then configure the Microsoft-Windows-International-Core component to apply fr-FR settings during the specialize configuration pass. 當電腦啟動時,安裝將會顯示英文文字。When the computer boots, the installation will display English text. 不過,當 specialize 設定階段完成之後,就會顯示法文文字。However, after the specialize configuration pass finishes, French text will be displayed.

您可以使用 DISM 來設定 Windows 映像 (線上或離線) 的語言設定。You can use DISM to configure the language settings of a Windows image (either online or offline). 如需詳細資訊,請參閱 DISM 語言和國際服務 Command-Line 選項For more information, see DISM Languages and International Servicing Command-Line Options.

[Windows 歡迎畫面] 預設會顯示地區設定使用者介面 (UI),以供使用者選取預設語言、地區設定及輸入設定。By default, Windows Welcome displays a Regional Settings user interface (UI) page for the end user to select default language, locale, and input settings. 您可以在 Microsoft Windows-國際核心元件的 oobeSystem 設定階段中指定語言和地區設定,以預先設定此 UI 頁面上的設定。You can preconfigure the settings on this UI page by specifying language and locale settings in the oobeSystem configuration pass in the Microsoft-Windows-International-Core component. 如果設定在 oobeSystem 設定階段中設定,則會略過 [地區設定] 頁面。If settings are set in oobeSystem configuration pass, the Regional Settings page is skipped. 如果語言設定是在特殊化期間設定,則會顯示 [地區設定] 頁面。If language settings are configured during specialize, the Regional Settings page will be displayed.

如需詳細資訊,請參閱 將語言套件新增至 WindowsFor more information, see Add Language Packs to Windows.

例子Examples

下列各節說明範例部署案例,並說明設定階段的執行時間。The following sections describe sample deployment scenarios and describe when configuration passes run.

若要執行 Windows 安裝程式To run Windows Setup

在此案例中,您會將 Windows 安裝到新的電腦。In this scenario, you install Windows to a new computer. 您可以從 Windows 產品媒體和回應檔案開始。You start with the Windows product media and an answer file.

  1. 執行 Windows 安裝程式並指定回應檔案。Run Windows Setup and specify an answer file. Windows 安裝程式啟動。Windows Setup starts.

  2. WindowsPE 設定階段會執行。The windowsPE configuration pass runs. <settings pass="windowsPE">系統會處理回應檔案區段中的設定。Settings in the <settings pass="windowsPE"> section of an answer file are processed. windowsPE 設定階段,您可以設定兩種不同的設定類型:適用于 Windows PE 環境的設定,例如 Windows PE 的顯示解析度和記錄檔位置。There are two different types of settings that you can configure during the windowsPE configuration pass: Settings that apply to the Windows PE environment, such as the display resolution and log file locations for Windows PE. 您也可以指定適用于 Windows 安裝的設定,例如設定磁碟分割或啟用動態更新。You can also specify settings that apply to the Windows installation, such as configuring disk partitions or enabling dynamic updates.

    • 只有當您從 Windows PE 環境執行 Windows 安裝程式時,才會套用回應檔案中的 Windows PE 特定設定。The Windows PE-specific settings in an answer file are applied only when you are running Windows Setup from a Windows PE environment.

    • 從 Windows PE 或先前的 Windows 安裝執行時,會套用 windowsPE 設定階段中的 Windows 安裝程式選項。The Windows Setup options in the windowsPE configuration pass are applied when it runs from either Windows PE or a previous Windows installation.

  3. 將 Windows 映像複製到硬碟之後,就會執行 offlineServicing 設定階段。After the Windows image is copied to the hard disk, the offlineServicing configuration pass runs. 回應檔案的和區段中的任何設定 <servicing> <settings pass="offlineServicing"> 都會套用至 Windows 映像。Any settings in the <servicing> and <settings pass="offlineServicing"> section of an answer file are applied to the Windows image. 一般而言,此設定中的動作會通過安裝或移除套件、語言套件或設備磁碟機。Typically, the actions in this configuration pass install or remove packages, language packs, or device drivers.

  4. 系統會重新開機,並 Windows 安裝程式執行 specialize 設定階段。The system restarts and Windows Setup runs the specialize configuration pass. 此時, <settings pass="specialize"> 系統會處理回應檔案區段中的設定。At this point, settings in the <settings pass="specialize"> section of the answer file are processed.

  5. Windows 安裝程式完成之後,電腦會重新開機。After Windows Setup completes, the computer restarts. 然後, <settings pass="oobeSystem> 系統會處理回應檔案區段中的 oobeSystem 設定階段執行和設定。Then, the oobeSystem configuration pass runs and settings in the <settings pass="oobeSystem> section of an answer file are processed.

    注意Note
    您可以建立名為 Oobe.xml 的個別內容檔案,您可以用來自訂 Windows 歡迎畫面、開始使用及 ISP 註冊。You can create a separate content file called Oobe.xml that you can use to customize Windows Welcome, Getting Started, and ISP sign up. 使用 Oobe.xml 有助於組織這些自訂,因為它可讓您維護單一檔案,其中列出多個國家/地區、區域及/或語言的所有商標、授權條款和註冊機會。Using Oobe.xml is useful for organizing these customizations, because it enables you to maintain a single file that lists all of the branding, license terms, and signup opportunities for multiple countries, regions and/or languages. 如需詳細資訊,請參閱 設定 Oobe.xmlFor more information, see Configure Oobe.xml. 一般來說,Oobe.xml 是由 Oem 和系統建造商使用。Generally, Oobe.xml is used by OEMs and System Builders. 不過,Oobe.xml 的某些層面可能也會受益于企業的部署案例。However some aspects of Oobe.xml might also benefit corporate deployment scenarios.

  6. Windows 歡迎畫面隨即啟動,且您可以開始使用電腦。Windows Welcome starts and you can begin using the computer.

執行 Sysprep/generalize/shutdown 命令To run the Sysprep /generalize /shutdown command

在此案例中,您將建立要在整個環境中使用的參考 Windows 映像。In this scenario, you will create a reference Windows image to use throughout your environment. 您可以從自訂的 Windows 安裝開始。You start with a customized Windows installation.

  1. 使用 /generalize/shutdown/oobe 選項執行 sysprep 命令,以建立主要映射、設定電腦開機到 Windows 歡迎畫面,然後關閉電腦。Run the sysprep command with the /generalize /shutdown /oobe options, to create a master image, configure the computer to boot to Windows Welcome, and then shut down the computer.

  2. 系統會套用回應檔案區段中的設定 <settings pass="generalize">The settings in the <settings pass="generalize"> section of an answer file are applied.

    • 如果您未指定具有 Sysprep 命令的回應檔案,將會使用快取到電腦的回應檔案。If you did not specify an answer file with the Sysprep command, the answer file cached to the computer will be used. 如需如何使用回應檔案的詳細資訊,請參閱 Windows 安裝程式自動化總覽For more information about how to use answer files, see Windows Setup Automation Overview.

    • 如果您指定了含有 sysprep 命令的回應檔案,該回應檔案會快取到 Windows 安裝的% WINDIR% \ >\panther\setupact.log 目錄,並將用於後續的設定階段。If you specified an answer file with the sysprep command, that answer file is cached to the %WINDIR%\Panther directory of the Windows installation and will be used on subsequent configuration passes.

  3. 電腦會關機,讓您可以開機至 Windows PE 或其他作業系統,然後捕獲映射。The computer shuts down, enabling you to boot to Windows PE or another operating system and capture the image. 下次 Windows 映像開機時,將會執行 specialize 設定階段,Windows 會將電腦開機到 windows 歡迎畫面。The next time the Windows image boots, the specialize configuration pass will run and Windows will boot the computer to Windows Welcome.

使用腳本部署 Windows 映像Using a Script to Deploy a Windows Image

在此案例中,您會使用執行 sysprep/generalize/shutdown/oobe 命令的主要映射來啟動電腦,並捕獲映射。In this scenario, you boot the computer with a master image on which the sysprep /generalize /shutdown /oobe command was run and the image was captured. 您可以從主要映射開始,Windows PE 和 DISM 工具。You start with a master image, Windows PE and the DISM tool.

  1. 使用 dism 命令搭配 /apply-image 選項,將主要映射套用至電腦。Apply the master image to a computer by using the dism command with the /apply-image option.

  2. 使用主要映射將電腦開機。Boot the computer with the master image. Windows 隨即啟動。Windows starts.

  3. Specialize 設定階段執行。The specialize configuration pass runs. <settings pass="specialize">系統會處理回應檔案區段中的設定。Settings in the <settings pass="specialize"> section of the answer file are processed.

  4. 電腦會重新啟動。The computer restarts.

  5. OobeSystem 設定階段會執行。The oobeSystem configuration pass runs. <settings pass="oobeSystem">系統會處理回應檔案區段中的設定。Settings in the <settings pass="oobeSystem"> section of the answer file are processed.

  6. Windows 歡迎畫面隨即啟動,且您可以開始使用您的電腦。Windows Welcome starts and you can begin using your computer.

將 Windows 開機至 audit 模式To boot Windows to audit mode

在此案例中,您會將設定為在 audit 模式下啟動的 Windows 映像開機。In this scenario, you boot a Windows image that is configured to start in audit mode. Audit 模式適用于將自訂應用程式、驅動程式和其他更新新增至主要映射。Audit mode is useful for adding custom applications, drivers, and other updates to a master image. 您可以在回應檔案中設定下列設定,以設定 Windows 映像將電腦開機為 audit 模式: Microsoft-Windows-Deployment |重新封裝 |Mode = 使用 /audit 選項來執行 Sysprep 命令或進行 審核You can configure a Windows image to boot the computer to audit mode by configuring the following setting in an answer file: Microsoft-Windows-Deployment | Reseal | Mode=Audit or, run the Sysprep command with the /audit option.

  1. 設定 Windows 映像以將電腦開機為 audit 模式。Configure the Windows image to boot the computer to audit mode. 在此案例中,請使用 /audit/reboot 選項執行 sysprep 命令。In this scenario, run the sysprep command with the /audit /reboot options.

  2. Windows 會重新開機電腦。Windows reboots the computer.

  3. AuditSystem 設定階段會執行。The auditSystem configuration pass runs. <settings pass="auditSystem">系統會處理回應檔案區段中的設定。Settings in the <settings pass="auditSystem"> section of the answer file are processed.

  4. 內建的系統管理員帳戶已啟用。The Built-in administrator account is enabled.

  5. AuditUser 設定階段會執行。The auditUser configuration pass runs. <settings pass="auditUser">系統會處理回應檔案區段中的設定。Settings in the <settings pass="auditUser"> section of the answer file are processed.

  6. 桌面隨即出現。The desktop appears.

下次重新開機電腦時,就會再次開機至 audit 模式。The next time that you reboot the computer, it will boot to audit mode again.

若要設定電腦開機到 Windows 歡迎畫面,您必須使用 sysprep 命令搭配 /oobe 選項,或設定 Microsoft-Windows-部署 |重新封裝 | Mode 在回應檔案中設定為 oobeTo configure the computer to boot to Windows Welcome, you must use the sysprep command with the /oobe option, or configure the Microsoft-Windows-Deployment | Reseal | Mode setting to oobe in an answer file.

針對離線 Windows 映像執行 DISMTo run DISM against an offline Windows image

在此案例中,您會針對離線 Windows 映像執行 DISM。In this scenario, you run DISM against an offline Windows image.

  1. 針對離線 Windows 映像執行 DISM 工具,並指定回應檔案。Run DISM tool against an offline Windows image and specify an answer file. 例如,若要在離線 Windows 映像中列出封裝,請使用下列命令:For example, to list the package in an offline Windows image, use the following command:

    Dism /image:C:\test\offline /Get-Packages
    
  2. 回應檔案的 <servicing> 和區段中的設定 <settings pass="offlineServicing"> 會套用至 Windows 映像。Settings in the <servicing> and <settings pass="offlineServicing"> sections of an answer file are applied to the Windows image. 下次您啟動電腦時,會處理套件和設定。The next time that you boot your computer, the packages and settings are processed.

如需詳細資訊,請參閱 DISM 映射管理 Command-Line 選項For more information, see DISM Image Management Command-Line Options.

在執行中的 Windows 映像上使用 DISMTo use DISM on a running Windows image

在此案例中,您會對執行中的 Windows 安裝執行 DISM 工具。In this scenario, you run the DISM tool against a running Windows installation.

  • 針對線上 Windows 映像執行 DISM 並指定回應檔案。Run DISM against an online Windows image and specify an answer file. 例如,若要列出 Windows 映像中的驅動程式資訊,請使用下列命令:For example, to list driver information in a Windows image, use the following command:

    Dism /online /Get-Drivers
    

    重要Important
    當您針對線上 Windows 安裝使用 DISM 與回應檔案時,回應檔案只應包含 offlineServicing 設定階段中的元素。When you use DISM with an answer file against an online Windows installation, the answer file should contain only the elements in the offlineServicing configuration pass. 這是因為 specialize 設定階段中的某些設定可能會套用至線上 Windows 安裝。This is because some settings in the specialize configuration pass might be applied to the online Windows installation.

在某些情況下,您可能需要重新開機電腦。In some instances, you might be required to restart your computer. 例如,如果您將語言套件新增至 Windows 安裝,就必須重新開機電腦。For example, if you add a language pack to your Windows installation, you must reboot the computer.

相關主題Related topics

auditSystemauditSystem

auditUserauditUser

一般化generalize

offlineServicingofflineServicing

oobeSystemoobeSystem

specializespecialize

windowsPEwindowsPE