Windows 升級記錄檔

注意

本文是進階) (400 層級的文章。

如需本節文章的完整清單,請參閱 解決 Windows 升級錯誤 。

在升級程序的每個階段,都會建立幾個記錄檔。 要對升級問題進行疑難排解,這些記錄檔不可或缺。 包含這些記錄檔的資料夾在升級目標電腦上預設是隱藏的。 若要檢視記錄檔,請設定 Windows 檔案總管檢視隱藏的項目,或使用工具自動收集這些記錄。 最實用的記錄檔是 setupact.log。 記錄檔根據 Windows 安裝程式階段而位於不同的資料夾。 回顧 可以從擴充程式代碼判斷階段。

注意

另請參閱本節中的 Windows 錯誤報告 文章,以取得尋找錯誤碼和記錄檔的協助。

下表說明一些記錄檔,以及如何使用它們來進行疑難排解︰

記錄檔 階段︰位置 描述 使用時機
setupact.log 舊版︰
$Windows.~BT\Sources\Panther
包含舊版階段期間安裝程式動作的相關資訊。 復原調查的所有下層失敗和起點。
Setup.act 是診斷安裝程序問題最重要的記錄檔。
setupact.log OOBE) (現用體驗:
$Windows.~BT\Sources\Panther\UnattendGC
包含 OOBE 階段期間動作的相關資訊。 調查 OOBE 階段和作業期間失敗的復原 - 0x4001C、0x4001D、0x4001E、0x4001F。
setupact.log 復原︰
$Windows.~BT\Sources\Rollback
包含復原期間動作的相關資訊。 調查一般復原 - 0xC1900101。
setupact.log 在下層) 之前預先初始化 (:
Windows
包含初始化安裝程式的相關資訊。 如果安裝程式無法啟動。
setupact.log 升級後 (OOBE 之後)︰
Windows\Panther
包含安裝期間安裝程式動作的相關資訊。 調查升級後的相關問題。
setuperr.log 與 setupact.log 相同 包含安裝期間安裝程式錯誤的相關資訊。 檢閱安裝階段期間發生的所有錯誤。
miglog.xml 升級後 (OOBE 之後)︰
Windows\Panther
包含安裝期間移轉內容的相關資訊。 找出升級後的資料移轉問題。
BlueBox.log 舊版︰
Windows\Logs\Mosetup
包含與 Windows Update之間的setup.exe信息通訊。 在 WSUS 期間使用 ,Windows Update 下層失敗或0xC1900107。
補充的復原記錄檔︰
Setupmem.dmp
setupapi.dev.log
事件記錄檔 (.*evtx)
$Windows.~BT\Sources\Rollback 復原期間收集的其他記錄檔。 Setupmem.dmp:如果OS錯誤在升級期間檢查,安裝程式會嘗試擷取迷你傾印。
Setupapi︰裝置安裝問題 - 0x30018
事件記錄檔︰一般復原 (0xC1900101) 或未預期的重新開機。

記錄項目結構

或 setupact.logsetuperr.log 專案包含下列元素:

  1. 日期和時間 - 2023-09-08 09:20:05

  2. 記錄層級 - 資訊、警告、錯誤、嚴重錯誤

  3. 記錄元件 - CONX、}PG、PANTHR、SP、IBSLIB、MIG、DISM、CSI、CBS

記錄元件 SP (安裝平臺) 、MIG (移轉引擎) ,以及 CONX (相容性資訊) 適用於針對 Windows 安裝程式錯誤進行疑難解答。

  1. 訊息 - 作業已順利完成。

參閱下列範例:

日期/時間 記錄層級 元件 訊息
2023-09-08 09:23:50, 警告 MIG 無法取代物件 C:\Users\name\Cookies。 無法移除目標物件。

分析記錄檔

下列指示適用於 IT 專業人員。 若要更熟悉 結果碼 並 擴充程式代碼,請參閱 升級錯誤碼一文。

分析 Windows 安裝程式記錄檔:

  1. 判斷 Windows 安裝程式錯誤碼。 如果升級程式不成功,Windows 安裝程式應該會傳回錯誤碼。

  2. 根據錯誤 碼的擴 充程式代碼部分,判斷要調查的記錄檔類型和位置。

  3. 在文本編輯器中開啟記錄檔,例如記事本。

  4. 使用 Windows 安裝程式錯誤碼的結果碼部分,在檔案中搜尋該結果碼,並尋找結果碼的最後一個項目。 或者您也可以搜尋下面步驟 7 所述的 "abort" 和 "abandoning" 文字字串。

  5. 尋找結果碼的最後一個項目︰

    1. 捲動至檔案底部,然後選取最後一個字元之後。
    2. 選取 [編輯]。
    3. 選 取 [尋找]。
    4. 輸入結果碼。
    5. 在 \[方向\] 下選取 \[向上\]。
    6. 選 取 [尋找下一步]。
  6. 找到最後一個出現的結果碼時,從檔案中的這個位置向上捲動幾行,然後檢閱在產生結果碼之前失敗的進程。

  7. 搜尋下列重要的文字字串︰

    • Shell application requested abort
    • Abandoning apply due to error for object
  8. 針對此區段中出現的 Win32 錯誤進行解碼。

  9. 記下此區段中所觀察到錯誤的時間戳記。

  10. 搜尋其他記錄檔是否有符合這些時間戳記或錯誤的其他資訊。

例如,假設錯誤的錯誤碼 是0x8007042B - 0x2000D。 搜尋 8007042B 會顯示檔案中的 setuperr.log 下列內容:

注意

下列文字中的某些行會縮短以增強可讀性。 例如

  • 每一行開頭的日期和時間 (例如:2023-10-05 15:27:08) 會縮短為分鐘和秒數
  • 憑證檔名是長文字字串,會縮短為只有 “CN”。

setuperr.log 內容:

27:08, Error           SP     Error READ, 0x00000570 while gathering/applying object: File, C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18 [CN]. Will return 0[gle=0x00000570]
27:08, Error           MIG    Error 1392 while gathering object C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18 [CN]. Shell application requested abort![gle=0x00000570]
27:08, Error                  Gather failed. Last error: 0x00000000
27:08, Error           SP     SPDoFrameworkGather: Gather operation failed. Error: 0x0000002C
27:09, Error           SP     CMigrateFramework: Gather framework failed. Status: 44
27:09, Error           SP     Operation failed: Migrate framework (Full). Error: 0x8007042B[gle=0x000000b7]
27:09, Error           SP     Operation execution failed: 13. hr = 0x8007042B[gle=0x000000b7]
27:09, Error           SP     CSetupPlatformPrivate::Execute: Execution of operations queue failed, abandoning. Error: 0x8007042B[gle=0x000000b7]

第一行指出檔案 C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18 [CN] 發生錯誤0x00000570:

27:08, Error           SP     Error READ, 0x00000570 while gathering/applying object: File, C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18 [CN]. Will return 0[gle=0x00000570]

錯誤 0x00000570 是 Win32 錯誤碼 ,對應於: ERROR_FILE_CORRUPT:檔案或目錄已損毀且無法讀取。

因此,Windows 安裝程式失敗,因為它無法移轉損毀的檔案 C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18[CN]。 此檔案是本機系統憑證,可以安全刪除。 setupact.log搜尋檔案以取得更多詳細數據之後,會在與 中行setuperr.log具有相同時間戳的位置中找到要求中止的 Shell 應用程式片語。 此分析會確認此檔案是升級失敗的原因:

setupact.log 內容:

27:00, Info                   Gather started at 10/5/2023 23:27:00
27:00, Info [0x080489] MIG    Setting system object filter context (System)
27:00, Info [0x0803e5] MIG    Not unmapping HKCU\Software\Classes; it is not mapped
27:00, Info [0x0803e5] MIG    Not unmapping HKCU; it is not mapped
27:00, Info            SP     ExecuteProgress: Elapsed events:1 of 4, Percent: 12
27:00, Info [0x0802c6] MIG    Processing GATHER for migration unit: <System>\UpgradeFramework (CMXEAgent)
27:08, Error           SP     Error READ, 0x00000570 while gathering/applying object: File, C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18 [CN]. Will return 0[gle=0x00000570]
27:08, Error           MIG    Error 1392 while gathering object C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18 [CN]. Shell application requested abort![gle=0x00000570]
27:08, Info            SP     ExecuteProgress: Elapsed events:2 of 4, Percent: 25
27:08, Info            SP     ExecuteProgress: Elapsed events:3 of 4, Percent: 37
27:08, Info [0x080489] MIG    Setting system object filter context (System)
27:08, Info [0x0803e5] MIG    Not unmapping HKCU\Software\Classes; it is not mapped
27:08, Info [0x0803e5] MIG    Not unmapping HKCU; it is not mapped
27:08, Info            MIG    COutOfProcPluginFactory::FreeSurrogateHost: Shutdown in progress.
27:08, Info            MIG    COutOfProcPluginFactory::LaunchSurrogateHost::CommandLine: -shortened-
27:08, Info            MIG    COutOfProcPluginFactory::LaunchSurrogateHost: Successfully launched host and got control object.
27:08, Error                  Gather failed. Last error: 0x00000000
27:08, Info                   Gather ended at 10/5/2023 23:27:08 with result 44
27:08, Info                   Leaving MigGather method
27:08, Error           SP     SPDoFrameworkGather: Gather operation failed. Error: 0x0000002C

setupapi.dev.log 內容:

>>>  [Device Install (UpdateDriverForPlugAndPlayDevices) - PCI\VEN_8086&DEV_8C4F]
>>>  Section start 2023/09/26 20:13:01.623
      cmd: rundll32.exe "C:\WINDOWS\Installer\MSI6E4C.tmp",zzzzInvokeManagedCustomActionOutOfProc SfxCA_95972906 484 ChipsetWiX.CustomAction!Intel.Deployment.ChipsetWiX.CustomActions.InstallDrivers
     ndv: INF path: C:\WINDOWS\TEMP\{15B1CD41-69F5-48EA-9F45-0560A40FE2D8}\Drivers\lynxpoint\LynxPointSystem.inf
     ndv: Install flags: 0x00000000
     ndv: {Update Device Driver - PCI\VEN_8086&DEV_8C4F&SUBSYS_05BE1028&REV_04\3&11583659&0&F8}
     ndv:      Search options: 0x00000081
     ndv:      Searching single INF 'C:\WINDOWS\TEMP\{15B1CD41-69F5-48EA-9F45-0560A40FE2D8}\Drivers\lynxpoint\LynxPointSystem.inf'
     dvi:      {Build Driver List} 20:13:01.643
     dvi:           Searching for hardware ID(s):
     dvi:                pci\ven_8086&dev_8c4f&subsys_05be1028&rev_04
     dvi:                pci\ven_8086&dev_8c4f&subsys_05be1028
     dvi:                pci\ven_8086&dev_8c4f&cc_060100
     dvi:                pci\ven_8086&dev_8c4f&cc_0601
     dvi:           Searching for compatible ID(s):
     dvi:                pci\ven_8086&dev_8c4f&rev_04
     dvi:                pci\ven_8086&dev_8c4f
     dvi:                pci\ven_8086&cc_060100
     dvi:                pci\ven_8086&cc_0601
     dvi:                pci\ven_8086
     dvi:                pci\cc_060100
     dvi:                pci\cc_0601
     sig:           {_VERIFY_FILE_SIGNATURE} 20:13:01.667
     sig:                Key      = lynxpointsystem.inf
     sig:                FilePath = c:\windows\temp\{15b1cd41-69f5-48ea-9f45-0560a40fe2d8}\drivers\lynxpoint\lynxpointsystem.inf
     sig:                Catalog  = c:\windows\temp\{15b1cd41-69f5-48ea-9f45-0560a40fe2d8}\drivers\lynxpoint\LynxPoint.cat
     sig:                Success: File is signed in catalog.
     sig:           {_VERIFY_FILE_SIGNATURE exit(0x00000000)} 20:13:01.683
     dvi:           Created Driver Node:
     dvi:                HardwareID   - PCI\VEN_8086&DEV_8C4F
     dvi:                InfName      - c:\windows\temp\{15b1cd41-69f5-48ea-9f45-0560a40fe2d8}\drivers\lynxpoint\lynxpointsystem.inf
     dvi:                DevDesc      - Intel(R) QM87 LPC Controller - 8C4F
     dvi:                Section      - Needs_ISAPNP_DRV
     dvi:                Rank         - 0x00ff2001
     dvi:                Signer Score - WHQL
     dvi:                DrvDate      - 04/04/2016
     dvi:                Version      - 10.1.1.18
     dvi:      {Build Driver List - exit(0x00000000)} 20:13:01.699
     ndv:      Searching currently installed INF
     dvi:      {Build Driver List} 20:13:01.699
     dvi:           Searching for hardware ID(s):
     dvi:                pci\ven_8086&dev_8c4f&subsys_05be1028&rev_04
     dvi:                pci\ven_8086&dev_8c4f&subsys_05be1028
     dvi:                pci\ven_8086&dev_8c4f&cc_060100
     dvi:                pci\ven_8086&dev_8c4f&cc_0601
     dvi:           Searching for compatible ID(s):
     dvi:                pci\ven_8086&dev_8c4f&rev_04
     dvi:                pci\ven_8086&dev_8c4f
     dvi:                pci\ven_8086&cc_060100
     dvi:                pci\ven_8086&cc_0601
     dvi:                pci\ven_8086
     dvi:                pci\cc_060100
     dvi:                pci\cc_0601
     dvi:           Created Driver Node:
     dvi:                HardwareID   - PCI\VEN_8086&DEV_8C4F
     dvi:                InfName      - C:\WINDOWS\System32\DriverStore\FileRepository\lynxpointsystem.inf_amd64_cd1e518d883ecdfe\lynxpointsystem.inf
     dvi:                DevDesc      - Intel(R) QM87 LPC Controller - 8C4F
     dvi:                Section      - Needs_ISAPNP_DRV
     dvi:                Rank         - 0x00ff2001
     dvi:                Signer Score - WHQL
     dvi:                DrvDate      - 10/03/2016
     dvi:                Version      - 10.1.1.38
     dvi:      {Build Driver List - exit(0x00000000)} 20:13:01.731
     dvi:      {DIF_SELECTBESTCOMPATDRV} 20:13:01.731
     dvi:           Default installer: Enter 20:13:01.735
     dvi:                {Select Best Driver}
     dvi:                     Class GUID of device changed to: {4d36e97d-e325-11ce-bfc1-08002be10318}.
     dvi:                     Selected Driver:
     dvi:                          Description - Intel(R) QM87 LPC Controller - 8C4F
     dvi:                          InfFile     - c:\windows\system32\driverstore\filerepository\lynxpointsystem.inf_amd64_cd1e518d883ecdfe\lynxpointsystem.inf
     dvi:                          Section     - Needs_ISAPNP_DRV
     dvi:                {Select Best Driver - exit(0x00000000)}
     dvi:           Default installer: Exit
     dvi:      {DIF_SELECTBESTCOMPATDRV - exit(0x00000000)} 20:13:01.743
     ndv:      Currently Installed Driver:
     ndv:           Inf Name       - oem1.inf
     ndv:           Driver Date    - 10/03/2016
     ndv:           Driver Version - 10.1.1.38
     ndv: {Update Device Driver - exit(00000103)}
!    ndv: No better matching drivers found for device 'PCI\VEN_8086&DEV_8C4F&SUBSYS_05BE1028&REV_04\3&11583659&0&F8'.
!    ndv: No devices were updated.
<<<  Section end 2019/09/26 20:13:01.759
<<<  [Exit status: FAILURE(0xC1900101)]

此分析指出可以藉由刪除 C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18\[CN] 檔案來解決 Windows 升級錯誤。

注意

在這裡範例中,完整檔案名是 C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18\be8228fb2d3cb6c6b0ccd9ad51b320b4_a43d512c-69f2-42de-aef9-7a88fabdaa3f。