Very often, we see discussions that include the advice to make a backup image of your system. Frequently, this advice is targeted to people who simply don't make regular backups and have no backup software.
For those individuals, I've created a little batch file that will use the command line WBADMIN to make an image backup. In addition, it will export all drivers from the system so that you have a separate backup of all drivers ready to be re-imported on a clean installation.
Before everyone hammers me on this: Yes, I know that the built-in disk imaging utility in Windows is horrible. Yes, I know it is deprecated. But it can still prove useful if it is all that you have.
One weird quirk of WBADMIN is that it creates the backup only in a folder named WindowsImageBackup in the root of the target drive and locks it down so that you have no access to the contents. So, after the backup is created this batch file will traverse that WindowsImageBackup folder giving the current user ownership of all files / folders.
To use, just copy the text below into a text file and name it something.bat (any name with a .bat extension is fine).
For those individuals, I've created a little batch file that will use the command line WBADMIN to make an image backup. In addition, it will export all drivers from the system so that you have a separate backup of all drivers ready to be re-imported on a clean installation.
Before everyone hammers me on this: Yes, I know that the built-in disk imaging utility in Windows is horrible. Yes, I know it is deprecated. But it can still prove useful if it is all that you have.
One weird quirk of WBADMIN is that it creates the backup only in a folder named WindowsImageBackup in the root of the target drive and locks it down so that you have no access to the contents. So, after the backup is created this batch file will traverse that WindowsImageBackup folder giving the current user ownership of all files / folders.
To use, just copy the text below into a text file and name it something.bat (any name with a .bat extension is fine).
Batch:
:: *****************************
:: * Quick Backup *
:: * by Hannes Sehestedt *
:: * Last update June 20, 2025 *
:: *****************************
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: This batch file will make a backup copy of all drivers installed on your ::
:: system and then it will use WBADMIN to make a disk image backup of your ::
:: system (C:, Recovery partition, EFI Partition) to a drive that you will ::
:: specify. WBADMIN will only backup to the root of a drive creating a folder ::
:: by the name of WindowsImageBackup. Another annoyance is that sets ::
:: permissions on that folder in a way that makes easy access difficult. So, ::
:: to work around this, after the backup is created this batch file will give ::
:: the currently logged on user ownership and permission to access this folder. ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
setlocal enabledelayedexpansion
setlocal enableextensions
cd /d %~dp0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Check to see if this batch file is being run as Administrator. If it is not, then rerun the batch file ::
:: automatically as admin and terminate the intial instance of the batch file. ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
(Fsutil Dirty Query %SystemDrive%>Nul)||(PowerShell start """%~f0""" -verb RunAs & Exit /B)
::::::::::::::::::::::::::::::::::::::::::::::::
:: End Routine to check if being run as Admin ::
::::::::::::::::::::::::::::::::::::::::::::::::
:: Ask for the drive letter to which backups should be saved.
echo Enter the drive letter to which we should backup the system and save drivers.
echo Please enter the letter only (no colon).
echo.
set /p Target="Enter the target drive letter (letter only): "
:: Create a folder named Drivers_Backup on the target drive
:: We will save a copy of all drivers to this location.
md %Target%:\Drivers_Backup
pnputil /export-driver * %Target%:\Drivers_Backup
:: Perform the disk image backup
wbadmin start backup -backuptarget:%Target%: -allcritical -quiet
:: Take ownership of the WindowsImageBackup folder on the target drive
set SourcePath=%Target%:\WindowsImageBackup
C:\windows\system32\takeown /f "%SourcePath%"
icacls "%SourcePath%" /grant %username%:F
C:\windows\system32\takeown /f "%SourcePath%\*.*" /r /d y
icacls "%SourcePath%\*.*" /T /grant %username%:F
cls
echo All operations have been completed.
echo.
pause
My Computers
-
At a glance
Win11 Pro 25H2 (RTM+)Intel i7-14650HX32 GBNo GPU - Built-in Intel Graphics- OS
- Win11 Pro 25H2 (RTM+)
- Computer type
- PC/Desktop
- Manufacturer/Model
- Acemagic
- CPU
- Intel i7-14650HX
- Memory
- 32 GB
- Graphics Card(s)
- No GPU - Built-in Intel Graphics
- Sound Card
- Integrated
- Monitor(s) Displays
- Varies as machine will often be moved to locations with different monitors
- Screen Resolution
- Varies
- Hard Drives
- 1 x 1TB Gen 4 NVMe SSD
- PSU
- 120W Power Brick
- Keyboard
- Corsair K70 Max RGB Magnetic Keyboard
- Mouse
- Logitech MX Master 3
- Internet Speed
- 1Gb Up / 1 Gb Down
- Browser
- Edge
- Antivirus
- Windows Defender
-
At a glance
Win11 Pro 25H2 (RTM+)Intel i7-1255U16 GBIntel Iris Xe Graphics- Operating System
- Win11 Pro 25H2 (RTM+)
- Computer type
- Laptop
- Manufacturer/Model
- Lenovo ThinkBook 13x Gen 2
- CPU
- Intel i7-1255U
- Memory
- 16 GB
- Graphics card(s)
- Intel Iris Xe Graphics
- Sound Card
- Realtek® ALC3306-CG codec
- Monitor(s) Displays
- 13.3-inch IPS Display
- Screen Resolution
- WQXGA (2560 x 1600)
- Hard Drives
- 2 TB 4 x 4 NVMe SSD
- PSU
- USB-C / Thunderbolt 4 Power / Charging
- Keyboard
- Backlit, spill resistant keyboard
- Mouse
- Buttonless Glass Precision Touchpad
- Internet Speed
- 1Gb Up / 1Gb Down
- Browser
- Edge
- Antivirus
- Windows Defender
- Other Info
- WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor




