The UI application "WIM-Backup" offers the possibility to create offline backups of Windows partitions (e.g. hard disk C:) in a WinPE environment. The Windows Imaging Format (WIM) is used for this purpose.
WIM-Backup is a Win32 application created in (Microsoft) C and Visual Studio 2010. Of course, you can also compile the project using a newer version of Visual Studio, such as 2019, or you can use an already compiled release version.
WIM-Backup offers a free backup option for a Windows-based system. So you don't always need a commercial software.
In the process of troubleshooting and fixing bugs on Windows 10-based systems, I repeatedly had to perform new installations of the operating system. This process proved to be very time-consuming in some cases. So I came up with the idea of backing up the Windows image so that it could be restored without much effort if necessary. This was the birth of WIM-Backup.
The solution consists of the following four components:
The following sketch roughly illustrates the essential relationships.
The instructions described below are necessary because the solution requires the use of a WinPE-based boot medium. However, this must not be made available for licensing reasons.
In short: I am not allowed to provide a bootable ISO file with the solution. You will have to create it yourself.
Download a current release version of WIM-Backup (or compile your own customised version).
You will need the Deployment and Imaging Tools from Microsoft. These can be found in the Windows ADK (Windows Assessment and Deployment Kit). Be sure to download the appropriate ADK version for your development environment (your Windows version). Make sure that you have selected the Deployment Tools in the features.
In addition, you need the Windows Assessment and Deployment Kit Windows Preinstallation Environment Add-ons (see download link from ADK). These are installed following the ADK setup.
Assuming that the processing of the previous steps was successful, the next step is to create a WinPE-enabled boot medium. This contains the WIM-Backup solution. To do this, start the Deployment and Imaging Tools Environment with administrative privileges.
Copy the amd64 directory to a folder that does not yet exist, for example C:\Temp\media.
Tip: Copy the desired commands to the clipboard (to the right of the respective command), this way you can speed up the creation process considerably.
copype amd64 c:\Temp\media
6. Then mount the **boot.wim** image from the previously copied **amd64** directory to the newly created **c:\temp\media\mount** directory. ``` dism /mount-image /imagefile:C:\Temp\media\media\sources\boot.wim /mountdir:C:\Temp\media\mount /index:1 ``` 7. Create the folder **Tools** in the directory **C:\Temp\media\mount**. ``` mkdir C:\Temp\media\mount\Tools ``` 8. Now copy the following release files into this folder: * **wimbckup.exe** * **action.bat** * **diskpart.txt** 9. You also need to copy the **winpkeshl.ini** file to **C:\Temp\media\mount\Windows\System32**. 10. Finally, the mounted image must be **un-mounted** and the **WinPEMedia ISO file** must be created. > Do not forget to close all windows/files/applications that are open on the mounted directory. Otherwise, DISM will complain that it cannot complete the unmounting process. ``` dism /unmount-image /mountdir:C:\Temp\media\mount /commit ``` ``` cd .. cd "Windows Preinstallation Environment" MakeWinPEMedia.cmd /iso C:\Temp\media C:\temp\wim-backup-114.iso ``` 11. After having created the **WinPE-ISO** file, we can now use **Rufus** to transfer it to a **USB flash drive** to boot from and create a WIM-based backup or restore an existing one: [Rufus on GitHub](https://github.com/pbatard/rufus) ![GitHub Repo stars](https://img.shields.io/github/stars/pbatard/rufus?style=social) > Of course, any other tool, such as **Ventoy**, can also be used for this purpose - so it doesn't necessarily have to be Rufus: [Ventoy on GitHub](https://github.com/ventoy/Ventoy) ![GitHub Repo stars](https://img.shields.io/github/stars/ventoy/Ventoy?style=social)
## WIM-Backup in action The following animation shows WIM-Backup in action when creating a backup. > For more information about WIM backup, such as how to use it, see the [Wiki](https://github.com/cregx/wim-backup/wiki/Using-the-WIM-Backup).
## FAQ ### :question: How much time should I expect to spend trying out the solution in my environment? It is very difficult to give a general answer to this question. I estimate the time required to work through the instruction steps at around 30 to 60 minutes. ### :question: Why is no bootable, i.e. ready-to-use ISO image incl. the WIM backup solution offered? The issue is with the license terms. According to this, I am not allowed to provide a pre-built image based on WinPE. That is the reason why every developer has to create his own ISO image. The internal use of this image (within the own team) should then not be a problem. ### :question: How are errors that occurred during backup or restore reported? WIM-Backup uses the dism.log file to identify possible errors. To do this, this file is checked for the occurrence of the pattern "Error" and a general error message is issued after a backup/restore operation is completed. You can find the dism.log file under the following file path: *%systemdrive%\Tools\dism.log*. Here, the *%systemdrive%* environment variable in WinPE normally points to the x:\ drive. ### :question: Are there any known limitations to using WIM-Backup? Yes, the list below shows the currently known restrictions: - If you want to backup a BitLocker-encrypted drive, you must first stop active BitLocker protection (BDE) in Windows. However, this does not mean that you have to decrypt the encrypted drive first. Once you exit BDE protection and restart the PC to boot from WinPE into the solution, WIM-Backup can access the drive. However, if you forget this step, WIM-Backup will not recognize the BDE-encrypted drive. - During the restore process, you can restore an existing WIM backup image on the C: drive only. Restoring to other drives is not supported. However, for partial restoration of the image, such as recovering specific files or directories, it is possible to use third-party programs like 7-Zip to extract parts of the backed-up data to other drives. - WIM-Backup can only create **offline backups**. Attempting to backup a system while it is running, that is, the operating system has booted properly, results in an error. - An overview of the operating systems tested with WIM-Backup can be found in the [Wiki](https://github.com/cregx/wim-backup/wiki/Requirements#tested-windows-versions). ## Stargazers, Forkers & other users Thanks to all for using WIM-Backup. ### Stargazers [![Stargazers repo roster for @cregx/wim-backup](http://reporoster.com/stars/cregx/wim-backup)](https://github.com/cregx/wim-backup/stargazers) ### Forkers [![Forkers repo roster for @cregx/wim-backup](http://reporoster.com/forks/cregx/wim-backup)](https://github.com/cregx/wim-backup/network/members) ## Code of Conduct Please refer to the [Code of Conduct](https://github.com/cregx/wim-backup/blob/main/CODE_OF_CONDUCT.md) for this repository. ## Disclaimer This program code is provided "as is", without warranty or guarantee as to its usability or effects on systems. It may be used, distributed and modified in any manner, provided that the parties agree and acknowledge that the author(s) assume(s) no responsibility or liability for the results obtained by the use of this code. [Made with ♥️](https://www.cregx.de)