windows系统修复

Windows 11 目前能够进入命令行,但无法进入正常桌面,这其实是一个比较好的状态:先不要重装系统,也不要急着“重置此电脑”。下面从安全到深入、尽量不损失数据的完整流程。

一、首先确认:现在的“命令行”是什么环境

能看到类似:那么实际上是在 Windows Recovery Environment(WinRE) 中。

X:\Windows\System32>

或者:此时 C: 不一定是你的 Windows 系统盘。

C:\Windows\System32>

二、第一步:确定 Windows 11 到底在哪个盘

先输入:

diskpart

然后:

list volume

看到类似:

Volume ###  Ltr  Label       Fs     Type        Size
----------  ---  ---------   -----  ----------  -------
Volume 0     C              FAT32   Partition    100 MB
Volume 1     D              NTFS    Partition    475 GB
Volume 2     E   DATA       NTFS    Partition    900 GB
Volume 3     X              NTFS    Partition    ...

然后exit进行退出;

D:
dir   切换到D盘查D盘是不是系统盘
E:
dir  切换到E盘查E盘是不是系统盘

找到类似说明找到系统盘了,D盘就是windows系统盘:
D:\Windows
D:\Users
D:\Program Files
D:\Program Files (x86)
D:\ProgramData

三、执行第二步:检查硬盘/文件系统

假设你的 Windows 在D盘:chkdsk D: /f,等待它完成。

如果显示类似:

Windows has scanned the file system and found no problems.

说明:文件系统结构基本正常。

如果显示类似:

Windows made corrections to the file system.

说明:文件系统存在错误,而且已经修复。

如果显示类似:

Windows replaced bad clusters

或者:

The disk does not have enough space to replace bad clusters

就要高度重视了。这可能意味着:SSD/HDD 本身存在坏块或存储介质问题。

四、执行第三步:检查 Windows 系统文件

假设D是系统盘:
sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows

说明:微软说明 SFC 可以扫描受保护的系统文件,并用正确文件替换损坏或缺失文件。

可能出现的几种结果

情况A系统文件没有发现完整性问题。
Windows Resource Protection did not find any integrity violations.

情况B,这是比较好的结果。
Windows Resource Protection found corrupt files
and successfully repaired them.

情况C,系统组件存储本身可能也损坏
Windows Resource Protection found corrupt files
but was unable to fix some of them.

五、第四步:使用 DISM 修复 Windows 组件

在正常 Windows 中,微软推荐:

dism /online /cleanup-Image /checkhealth
dism /online /cleanup-Image /scanhealth 较长时间需要全方位检测电脑系统
DISM /Online /Cleanup-Image /RestoreHealth 需连网在线下载损坏的系统文件进行修复

然后再:

sfc /scannow

微软官方也明确建议 DISM 与 SFC 配合使用。但是进不了 Windows,所以不能使用 /Online。应该使用:

DISM /Image:D:\ /Cleanup-Image /RestoreHealth

这里假设:D:\Windows 就是你的 Windows 11。

六、如果 DISM 报错怎么办?

Error: 0x800f081f
或者:
The source files could not be found.
这意味着 DISM 找不到用于修复 Windows 的源文件。

使用与你当前 Windows 11 版本匹配的 Windows 11 安装 U 盘/ISO 作为修复源。

假设 Windows 安装 U 盘是:E, 那么就
dir E: 如果有sources
dir E:\sources
install.wim 或 install.esd 就可以作为修复源
DISM /Get-WimInfo /WimFile:E:\sources\install.wim

查看里面有哪些 Windows 版本。然后根据实际 Index 使用:
DISM /Image:D:\ /Cleanup-Image /RestoreHealth /Source:wim:E:\sources\install.wim:6 /LimitAccess
这里的:win:6 只是举例可以根据DISM /Get-WimInfo来获取。

七、第五步:检查 Windows 启动系统

如果:

Windows Logo 能出现 → 然后黑屏/蓝屏/重启

就需要检查启动配置。

首先:

bcdedit

找到:

Windows Boot Loader
-------------------
identifier
device
path
osdevice
systemroot

重点看:

osdevice

例如:

osdevice partition=D:

那么系统就是:

D:

八、Windows 11 UEFI 启动修复——非常重要

diskpart
list volume

找一个FAT32分区100MB~300MB左右,这通常就是 EFI System Partition。
select volume 2 ;假设它是Volume 2:
assign letter=S
exit
bcdboot D:\Windows /s S: /f UEFI
如果成功,会出现类似:Boot files successfully created.
shutdown /r /t 0

九、如果是“登录后黑屏”,先做一个非常有价值的测试

按:

Ctrl + Shift + Esc

看看能不能打开任务管理器。

如果任务管理器能打开:

点击:

运行新任务

输入:

explorer.exe

然后回车。如果桌面马上出现,那么非常有价值。

说明:

Windows 本身已经启动成功,问题很可能集中在 Explorer/Shell/启动项,而不是整个 Windows 系统损坏。

转载请注明出处:  https://www.cntworld.cn
智能工控 » windows系统修复

发表回复

提供最优质的资源集合

立即查看 了解详情
文章加载时间:0.0041 秒