Windows 安裝程式記錄檔和事件記錄檔Windows Setup Log Files and Event Logs

Windows® 安裝程式會建立在安裝期間所發生的所有動作的記錄檔。Windows® Setup creates log files for all actions that occur during installation. 如果您遇到安裝 Windows 的問題,請參閱記錄檔來疑難排解安裝問題。If you are experiencing problems installing Windows, consult the log files to troubleshoot the installation.

Windows 安裝程式記錄檔位於下列目錄:Windows Setup log files are available in the following directories:

記錄檔位置Log file location 描述Description


安裝程式才能存取該磁碟機,請記錄位置。Log location before Setup can access the drive.


當安裝程式回復發生嚴重錯誤時,請記錄位置。Log location when Setup rolls back in the event of a fatal error.


記錄檔的磁碟設定後安裝動作的位置。Log location of Setup actions after disk configuration.


用以記錄隨插即用裝置安裝。Used to log Plug and Play device installations.


檢查的記憶體傾印從 bug 的位置。Location of memory dump from bug checks.


檢查錯誤的小型傾印的位置。Location of log minidumps from bug checks.


Sysprep 記錄檔的位置。Location of Sysprep logs.

Windows 安裝程式事件記錄檔Windows Setup Event Logs

Windows 安裝程式包含檢閱 Windows 事件記錄檔檢視器中的 Windows 安裝程式的效能事件的能力。Windows Setup includes the ability to review the Windows Setup performance events in the Windows Event Log viewer. 這可讓您更輕鬆地檢閱 Windows 安裝過程中發生的動作,並檢閱不同部分的 Windows 安裝程式的效能統計資料。This enables you to more easily review the actions that occurred during Windows Setup and to review the performance statistics for different parts of Windows Setup. 您可以篩選以檢視只有相關的項目,您有興趣的記錄檔。You can filter the log so as to view only relevant items that you are interested in. Windows 安裝程式的效能事件會儲存到記錄檔,稱為 Setup.etl,位於 %WINDIR%\Panther 目錄中的所有安裝。The Windows Setup performance events are saved into a log file that is named Setup.etl, which is available in the %WINDIR%\Panther directory of all installations. 若要檢視記錄檔,您必須使用事件檢視器包含在 Windows 媒體,對應至您要建置的自訂映像的版本。To view the logs, you must use the Event Viewer included with the Windows media that corresponds to the version of the customized image that you are building.

若要檢視記錄檔不包含對應的套件的電腦上,您必須從媒體安裝的 Windows 事件追蹤 (ETW) 提供者的根目錄中執行指令碼。To view the logs on a computer that does not include the corresponding kit, you must run a script from the root of the media that installs the Event Trace for Windows (ETW) provider. 從命令列中,輸入:From the command line, type:

Cscript D:\sources\etwproviders\etwproviderinstall.vbs install D:\sources\etwproviders

何處D是 Windows DVD 媒體的磁碟機代號。where D is the drive letter of the Windows DVD media.

若要檢視 Windows 安裝程式事件記錄檔To view the Windows Setup event logs

  1. 啟動事件檢視器,依序展開 [Windows 記錄] 節點,然後按一下系統Start the Event Viewer, expand the Windows Logs node, and then click System.

  2. 動作窗格中,按一下開啟已儲存的記錄,然後尋找 Setup.etl 檔案。In the Actions pane, click Open Saved Log and then locate the Setup.etl file. 根據預設,此檔案位於 %WINDIR%\Panther 目錄。By default, this file is available in the %WINDIR%\Panther directory.

  3. 記錄檔內容則會出現在事件檢視器中。The log file contents appear in the Event Viewer.

若要將記錄檔匯出至檔案To Export the log to a file

從命令列中,使用Wevtutil或是Tracerpt命令,以將記錄儲存的.xml 或文字檔案。From the command line, use the Wevtutil or Tracerpt commands to save the log to an .xml or text file. 如需有關如何使用這些工具的資訊,請參閱命令列說明。For information about how to use these tools, see the command-line Help. 下列命令示範如何使用工具的範例:The following commands show examples of how to use the tools:

Wevtutil qe /lf C:\windows\panther\setup.etl 

- 或者 --or-

Tracerpt /l C:\windows\panther\setup.etl

相關的主題Related topics

Windows 安裝程式命令列選項Windows Setup Command-Line Options

Windows 安裝程式狀態Windows Setup States

Windows 安裝程式版本設定和產品識別碼檔案 (EI.cfg 和 PID.txt)Windows Setup Edition Configuration and Product ID Files (EI.cfg and PID.txt)