How to restore from the OS backup

A customer requirement for a recent pilot project was to migrate user workstations to Vista for only a few weeks; we have to restore to the previous OS at the end of the pilot. There are other scenarios in which you’d need to restore a system using the fat WIM captured with the MDT Backup script in your deployment task sequence. Here’s a rough process to do the restore.

Ensure the backup WIM is in that folder. If the deployment failed, the backup should be there already. If the deployment succeeded, the backup WIM should be at C:\Windows\Temp\StateStore; move it to C:\_SMSTaskSequence\StateStore. If there was insufficient space on the hard drive to store the backup (regardless of whether the deployment failed or succeeded) and you properly configured your CustomSettings.ini, the WIM will be on a network share. Copy it to C:\_SMSTaskSequence\StateStore (I recommend using robocopy /tee to see the progress).

Double- and triple-check that everything you need from the system is copied off elsewhere or under C:\_SMSTaskSequence.

REM initialize variable for total number of root files/folders
set /a intTotal=0

REM loop through each root file/folder and increment counter if it’s not C:\_SMSTaskSequence
FOR /f “delims=” %%i in (‘dir c:\ /b /a’) do if not %%i==_SMSTaskSequence set /a intTotal+=1

echo wiping drive …
echo.

REM initialize variable for current file/folder
set /a intCount=1

REM loop through each root file/folder,
REM if it’s not C:\_SMSTaskSequence, pass the object name to the PROCESSOR section
for /f “delims=” %%i in (‘dir c:\ /b /a /o:n’) do if not %%i==_SMSTaskSequence call :PROCESSOR “%%i”

:SYNTAX
echo You must supply at least one argument to run this script.
echo Delayed environment variable expansion (/v:on) should be
echo enabled to correctly display the progress.
echo.
echo cmd /v:on /c wipe.cmd wipe

Disclaimer: The information on this site is provided “AS IS” with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use.