Windows 磁盘分区合并 + BitLocker 恢复
使用 AI 桌面助手 + AOMEI 分区工具扩展 C 盘空间的全流程指南。
适用场景
- C 盘空间不足,需要扩展
- 删除多余分区后想合并空间到 C 盘
- 分区操作前需要暂停/恢复 BitLocker 加密
核心原则
AI 和 GUI 操作的边界划分是成功的关键:
| 操作类型 | 执行者 | 工具 |
|---|---|---|
| 检查磁盘、删除分区、BitLocker 管理 | AI | PowerShell / diskpart / manage-bde |
| 移动/扩展分区 | 用户手动 | AOMEI Partition Assistant |
> 为什么 AOMEI 必须手动操作?
> AOMEI 的 MFC 界面控件不暴露给无障碍 API (UIAutomation),AI 无法可靠自动化。鼠标模拟也常因 DPI 缩放而失败。建议:AI 负责 CLI,用户负责 GUI 拖拽。
第一步:前置准备
1.1 确认磁盘布局
Get-Partition -DiskNumber 0 | Format-Table PartitionNumber, DriveLetter, @{N="SizeGB";E={[math]::Round($_.Size/1GB,1)}}, Type
1.2 检查 BitLocker 状态(重要!)
manage-bde -status
如果显示「保护状态: 已启用」,必须先暂停:
manage-bde -protectors -disable C:
manage-bde -protectors -disable D:
manage-bde -protectors -disable E:
> ⚠️ 不暂停 BitLocker 就操作分区,可能导致数据无法访问。
第二步:删除目标分区(AI 执行)
⚠️ 危险操作警告
执行前必须确认:
1. 目标分区数据已备份或为空
2. 分区号已通过 list partition 确认
3. 用户已明确确认删除
# 创建 diskpart 脚本(替换 <目标分区号>)
@"
select disk 0
list partition
select partition <目标分区号>
delete partition override
"@ | Out-File -FilePath delete_partition.txt -Encoding ASCII
# 执行
Start-Process diskpart -ArgumentList "/s $PWD\delete_partition.txt" -Verb RunAs -Wait
第三步:AOMEI 手动操作
3.1 安装工具
- 下载地址:https://www.disktool.cn/download.html
- 版本:标准版(免费)
- 以管理员权限运行
3.2 移动分区流程
E 盘:右键 → 调整/移动 → 拖到最右侧 → 确定
↓
D 盘:右键 → 调整/移动 → 拖到最右侧 → 确定
↓
C 盘:右键 → 调整/移动 → 向右拖动扩展 → 确定
3.3 ⚠️ 点击「套用」按钮
必须点击「套用」按钮,否则所有拖拽操作不会生效!
- 点击顶部工具栏「套用」按钮
- 确认操作列表
- 点击「执行」
- 重启电脑
> PreOS 模式自动执行(10-30 分钟),期间不要强制关机。
第四步:恢复 BitLocker(AI 执行)
分区操作完成后:
# 检查状态
manage-bde -status
# 启用保护器
manage-bde -protectors -enable C:
manage-bde -protectors -enable D:
manage-bde -protectors -enable E:
# 数据盘自动解锁
manage-bde -autounlock -enable D:
manage-bde -autounlock -enable E:
验证结果
Get-Partition -DiskNumber 0 | Format-Table PartitionNumber, DriveLetter, @{N="SizeGB";E={[math]::Round($_.Size/1GB,1)}}, Type
manage-bde -status
常见问题
| 问题 | 解决方法 |
|---|---|
| 忘了点「套用」就重启? | 操作未生效,需重新操作 |
| 想撤销 AOMEI 操作? | 点击「撤销」或 Ctrl+Z |
| 分区移动后无法启动? | Windows RE → bootrec /fixmbr + bootrec /fixboot |
| BitLocker 要求恢复密钥? | 在 Microsoft 账户中查找 48 位恢复密钥 |
| manage-bde 拒绝访问? | 以管理员权限运行 PowerShell |
注意事项
- 删除分区前务必确认数据已备份
- BitLocker 必须在操作前暂停、操作后恢复
- 笔记本必须接通电源
- PreOS 执行期间不要强制关机
- 「套用」按钮必须点击