Windows 10 1709无法升级及DISM/SFC修复失败求助
大家好,我最近碰到了个头疼的问题——我想给我的Windows 10 1709安装更新的版本,但所有尝试都以失败告终。不确定SFC和DISM工具出现的问题是否和升级失败有关,但这俩工具确实都没法正常完成修复。在运行SFC和DISM之前,我已经先执行过chkdsk /f /r检查磁盘了。
我试过的升级方式
- 通过Windows Update尝试升级到1803版本
- 通过Windows Update尝试升级到1903版本
- 通过Windows Update尝试升级到21H2版本
- 使用Windows媒体创建工具制作的USB安装盘,尝试升级到22H2版本
系统镜像修复尝试
SFC扫描结果
运行sfc /scannow后,返回了以下错误:
Windows Resource Protection found corrupt files but was unable to fix some
of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For
example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not
supported in offline servicing scenarios.
DISM命令尝试
- 首先运行
DISM /online /cleanup-image /restorehealth,得到错误:
Error: 0x800f081f
The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the
feature.
The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
我尝试指定22H2镜像的
install.wim路径,运行DISM /online /cleanup-image /restorehealth /source:D:\install.wim,但还是返回相同的0x800f081f错误,日志位置依旧是上面提到的路径。运行
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore倒是得到了正常结果:
Component Store (WinSxS) information: Windows Explorer Reported Size of Component Store : 9.42 GB Actual Size of Component Store : 9.09 GB Shared with Windows : 6.42 GB Backups and Disabled Features : 2.41 GB Cache and Temporary Data : 252.40 MB Date of Last Cleanup : 2023-04-29 09:57:40 Number of Reclaimable Packages : 0 Component Store Cleanup Recommended : No The operation completed successfully.
额外操作与发现
我试过用一套重置Windows更新服务的命令来解决问题,但过程中遇到了状况:
net stop bits net stop wuauserv net stop appidsvc net stop cryptsvc Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\*.*" rmdir %systemroot%\SoftwareDistribution /S /Q rmdir %systemroot%\system32\catroot2 /S /Q regsvr32.exe /s atl.dll regsvr32.exe /s urlmon.dll regsvr32.exe /s mshtml.dll netsh winsock reset netsh winsock reset proxy net start bits net start wuauserv net start appidsvc net start cryptsvc
执行时发现appidsvc服务根本启动不了,提示是数字签名损坏,我不知道这会不会影响当前的问题。
另外,在CBS日志里,我多次看到以下内容(来自不同的SFC扫描会话):
00005f53 [SR] Repairing 4 components 00005f54 [SR] Beginning Verify and Repair transaction 00005f57 [SR] Cannot verify component files for Microsoft-Hyper-V-Drivers-Hypervisor, version 10.0.16299.1087, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}, manifest is damaged (true) 00005f5a [SR] Cannot verify component files for Microsoft-Hyper-V-3dVideo, version 10.0.16299.726, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}, manifest is damaged (true) 00005f5d [SR] Cannot verify component files for Microsoft-OneCore-IsolatedUserMode-Common, version 10.0.16299.1059, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}, manifest is damaged (true) 00005f60 [SR] Cannot verify component files for Microsoft-OneCore-IsolatedUserMode-Kernel, version 10.0.16299.699, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}, manifest is damaged (true) 00005f61 [SR] Repair complete 00005f76 [SR] Committing transaction 00005f7b [SR] Verify and Repair Transaction completed. All files and registry keys listed in this transaction have been successfully repaired
看到这个后,我想着卸载Hyper-V试试会不会有改善,但卸载时收到错误:The component store has been corrupted. Error 0x80073712
后续更新
我尝试执行同版本的就地升级修复,结果也失败了,收到的错误是:
0x80070004 – 0x3000D
The installation failed in the FIRST_BOOT phase with an error during
MIGRATE_DATE operation.
之后我在C:\$WINDOWS.~BT\Sources\Rollback目录里找到了setuperr.log,内容如下:
Error SP CSetupPlatformOSSwitchCheckpoint::Rollback: Deleting of "C:\Windows.old" directory failed.[gle=0x00000091] Error IBSLIB OSRollbackService::CBootFilesRestoreCheckpoint::Rollback: Failed to create WinPE rollback directory: C:\$WINDOWS.~BT\Sources\Rollback\WinPE[gle=0x000000b7]
而setupact.log里有大量类似这样的警告条目:
Warning SP SPMoveFileWithShortName: Failed to move \?\c:\Windows\INF\3ware.PNF to \?\c:\Windows.old\Windows\INF\3ware.PNF, error: 0x00000002
关键补充信息
我之前修改过注册表项Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList里的可扩展字符串值ProfilesDirectory,把用户配置文件的路径改成了非默认的位置,当时没觉得这会是个重要因素,现在想想可能有关系。
备注:内容来源于stack exchange,提问作者Brian




