docs(blogs): add Windows driver backup and restore guide
Deploy to Vercel / deploy (push) Successful in 1m35s

This commit is contained in:
2026-06-23 10:29:19 +08:00
parent 40a6f65585
commit 458b22af3b
2 changed files with 166 additions and 0 deletions
@@ -0,0 +1,83 @@
---
title: Backup and Restore Windows Drivers When Reinstalling the System
tags:
- windows
- driver
- backup
- system-reinstall
- dism
author:
name: Zihlu Wang
email: real@zihluwang.me
---
import { Kbd } from "@rspress/core/theme"
One of the most tedious parts of reinstalling Windows is getting all the drivers back — graphics, network, audio, Bluetooth, touchpad, chipset — missing any one of them disrupts your workflow. Windows Update can fetch some automatically, but the versions are often outdated, and niche hardware drivers may not be found at all.
Fortunately, Windows' built-in DISM tool provides driver export and restore functionality. Spend one minute backing up before the reinstall, and you can restore every driver in a single command afterwards.
## Before Reinstalling: Back Up All Drivers
Open a terminal as **Administrator** (PowerShell or Command Prompt) and run:
```powershell
dism /online /export-driver /destination:D:\DriverBackup
```
Replace `D:\DriverBackup` with your desired backup path. It is best to save the backup to an external drive, USB stick, or a non-system partition so it survives the reformat.
The command enumerates every third-party driver installed on the system and exports them to the destination folder. The whole process typically completes within a minute. You should see output similar to:
```
The operation completed successfully.
```
Keep the backup directory safe, and you are ready to reinstall.
### What gets backed up?
The command exports **third-party drivers** — i.e. drivers that are not built into Windows. This covers graphics cards, audio, network adapters, chipsets, Bluetooth, card readers, and any other drivers you have installed over the lifetime of the system. Generic inbox drivers that ship with Windows are skipped, as they will be restored automatically after the reinstall.
## After Reinstalling: Restore All Drivers
### Method 1: One-command restore (recommended)
This is the most convenient approach. Open a terminal as **Administrator** and run:
```powershell
dism /online /add-driver /driver:D:\DriverBackup /recurse
```
The `/recurse` flag tells DISM to search all subfolders within the backup directory and install every driver it finds. **You must restart the computer** afterwards for the changes to take effect.
### Method 2: Via Device Manager (GUI)
If you prefer a graphical interface or only need to restore specific drivers:
1. Press <Kbd>Win</Kbd> + <Kbd>X</Kbd> and select **Device Manager**
2. Locate devices marked with a yellow exclamation mark (missing drivers)
3. Right-click the device and choose **Update driver**
4. Select **Browse my computer for drivers**
5. Point the path to your driver backup directory and tick **Include subfolders**
6. Click Next — Windows will search and install the matching driver
Repeat for each device until all are restored.
## Common Issues
### "The driver package could not be installed"
In rare cases, certain drivers may fail to install via DISM due to signature issues or version incompatibility. As a workaround, locate the corresponding `.inf` file in the backup directory, right-click it, and select **Install**.
### Some devices still lack drivers after restore
DISM only backs up drivers that were currently installed. If a device was already undriven before the backup, its driver will obviously not be included. It is worth checking Device Manager beforehand to ensure all hardware is properly functional.
### Can I restore across Windows versions?
Restoring drivers from Windows 10 to Windows 11 on the same machine is generally viable, but migrating driver backups across different hardware is not recommended. Each machine should have its own independent backup.
## Summary
The key advantage of this workflow is **zero third-party dependencies** — DISM is a built-in Windows component, and no extra software is required. One minute to export before reinstalling, one command to restore afterwards. Far more efficient than manually downloading and installing each driver one by one. Make driver backup a habit before every system reinstall, and each migration will be that much smoother.
@@ -0,0 +1,83 @@
---
title: 通过备份驱动的方式重装系统后一键恢复驱动
tags:
- windows
- driver
- backup
- system-reinstall
- dism
author:
name: Zihlu Wang
email: real@zihluwang.me
---
import { Kbd } from "@rspress/core/theme"
重装 Windows 系统后,最让人头疼的环节之一就是安装驱动程序——显卡、网卡、声卡、蓝牙、触摸板……缺少任何一个都会影响正常使用。Windows Update 能自动拉取一部分,但往往版本老旧或根本找不到某些小众硬件的驱动。
好在 Windows 内置的 DISM 工具提供了驱动导出和恢复功能,只需在重装前花一分钟备份,重装后就能一键恢复所有驱动。
## 重装前:备份所有驱动
以**管理员身份**打开终端(PowerShell 或命令提示符均可),执行以下命令:
```powershell
dism /online /export-driver /destination:D:\DriverBackup
```
将 `D:\DriverBackup` 替换为你的备份目标路径。建议放到外置硬盘、U 盘或非系统盘,确保重装时不会被格式化。
命令执行后会遍历系统中所有已安装的第三方驱动,逐个导出到目标目录。整个过程通常在一分钟左右完成。导出完成后,你会看到类似如下的输出:
```
The operation completed successfully.
```
将该备份目录妥善保存即可进行系统重装。
### 备份了什么?
该命令导出的是**第三方驱动程序**(即非 Windows 内置驱动),包括显卡、声卡、网卡、芯片组、蓝牙、读卡器等所有你在系统使用过程中安装过的驱动。Windows 自带的通用驱动不会被导出,这部分系统重装后会自动回归。
## 重装后:一键恢复所有驱动
### 方法一:命令行一键恢复(推荐)
这是最省心的方式。同样以**管理员身份**打开终端,执行:
```powershell
dism /online /add-driver /driver:D:\DriverBackup /recurse
```
`/recurse` 参数会递归搜索备份目录下的所有子文件夹,将每一个驱动都安装到新系统中。执行完成后**必须重启电脑**使其生效。
### 方法二:通过设备管理器逐个安装
如果你更偏好图形界面,或者只需要恢复特定驱动:
1. 按 <Kbd>Win</Kbd> + <Kbd>X</Kbd>,选择**设备管理器**
2. 找到带有黄色感叹号的设备(即缺失驱动的设备)
3. 右键点击该设备,选择**更新驱动程序**
4. 选择**浏览我的电脑以查找驱动程序**
5. 将路径指向你的驱动备份目录,勾选**包括子文件夹**
6. 点击下一步,系统会自动搜索并安装匹配的驱动
重复以上步骤直到所有设备都恢复正常。
## 常见问题
### 显示 "The driver package could not be installed"
少数情况下,某些驱动可能因为签名问题或版本不兼容而无法通过 DISM 安装。这时可以尝试手动安装:在备份目录中找到对应的 `.inf` 文件,右键选择**安装**。
### 恢复后仍有设备缺失驱动
DISM 备份的仅是当前系统上已安装的驱动。如果重装前就有设备未被正确驱动,这些设备的驱动自然不会存在于备份中。建议在备份前先用设备管理器确认所有设备都已正常工作。
### 能否跨 Windows 版本恢复?
同一台电脑从 Windows 10 升级到 Windows 11 的驱动恢复通常是可行的,但不建议在不同硬件配置的电脑间迁移驱动备份。每台机器的驱动应独立备份。
## 小结
这套流程的核心优势在于**零第三方工具依赖**——DISM 是 Windows 内建组件,无需安装任何额外软件。重装前花一分钟导出,重装后一条命令恢复,比手动逐个下载安装驱动高效得多。养成重装前先备份驱动的习惯,能让每次系统迁移都轻松不少。