The Enhanced Write Filter is also shipped with Windows Embedded Standard 7. However it does not include the Disk mode known from earlier Embedded versions. The Disk Mode allowed to save all the changes on a separate hard drive.
There is an alternative approach available to create a scenario similar to the EWFs Disk Mode – you can use VHDs.
Because Windows 7 and also WES7 support to boot from VHDs (Virtual Hard Disks) you can make use of the differential VHD feature.
This feature allows you to create one master VHD file containing the operating system in the state it should stay and a differential VHD which stores all the changes made to the master image during runtime.
For example you can have your Master VHD file on a Compact Flash and the differential file on a hard disk to redirect all the writes away from the flash media.
One feature from EWF is to discard all changes made to the image on every reboot.
The solution for this is to create a new differential VHD file with the master as parent and use the new VHD as default boot entry.
After a reboot the system is back in its original state.
To automate this process you can use the following batch file. Please adapt the paths to your VHD location in the “Variables” section. Have a look below for the installation of the batch file.
The system works with 2 differential VHD files which will be swapped out on every boot.
On each boot the batchfile checks which differential VHD is active.
It will then delete the non-active differential VHD and recreates the non-active VHD.
By this all previous changes are undone. Then the batchfile will set the new non-active VHD as new default boot device.
On the next start the system will boot from the fresh created VHD.
@echo off
echo VHD Diff Resetter created by Wolfgang UngerREM #########################
REM Variables
REM #########################
set VHD_Drive=D:
set VHD_Parent=wes7.vhd
set VHD_DiffFile1=wes7diff1.vhd
set VHD_DiffFile2=wes7diff2.vhdset TempFile=D:\diskpart.txt
REM #########################REM Try to delete the second diff file. if successful image 1 is bootet.
del %VHD_Drive%\%VHD_DiffFile2%
if exist "%VHD_Drive%\%VHD_DiffFile2%" goto File2del %VHD_Drive%\%VHD_DiffFile2%
echo create vdisk file=%VHD_Drive%\%VHD_DiffFile2% parent=%VHD_Drive%\%VHD_Parent% > %TempFile%
echo exit >> %TempFile%diskpart /s %TempFile%
bcdedit /set {current} device vhd=[%VHD_Drive%]\%VHD_DiffFile2%
bcdedit /set {current} osdevice vhd=[%VHD_Drive%]\%VHD_DiffFile2%GOTO Done
:File2del %VHD_Drive%\%VHD_DiffFile1%
echo create vdisk file=%VHD_Drive%\%VHD_DiffFile1% parent=%VHD_Drive%\%VHD_Parent% > %TempFile%
echo exit >> %TempFile%diskpart /s %TempFile%
bcdedit /set {current} device vhd=[%VHD_Drive%]\%VHD_DiffFile1%
bcdedit /set {current} osdevice vhd=[%VHD_Drive%]\%VHD_DiffFile1%:Done
del %TempFile%
echo Done.
This solution can be helpful when
Post new comment