These are the script files for my blog post at http://www.stephan-schwarz.net/?p=123 describing how to create a custom recovery partition similar to OEM recovery partitions using MDT.
Please read the post on how to use them.
I’ve spent quite some time in refining the scripts that I’ve used and added some basic logging that should make it easier to identify errors in case one of the tasks fails. I’ve also managed to consolidate all the different batch files,
and the different diskpart scripts to 1 single batch file.
So in a bullet point list as of what’s new:
- Support for Windows ADK
- Scripts are now located in a subdirectory of the %scriptroot% folder named [\WinRE]
- All script files have been consolidated into 1 single batch script [MDT-WinRE.cmd]
- Support for cross-architecture deployments (meaning you can deploy a 64-bit Windows version from a 32-bit WinPE)
- LTISysprep.wsf from MDT2012 U1 has been modified in order to function properly.
- ZTIBackup.wsf from MDT2012 U1 has been modified, this time I’ve taken the time to carefully edit the file and only remove the unneeded sections. It’s no longer a simple rename action of the uselocal variable value in order to force it
to use the local disk. All checks are still in place, it will now properly fail before starting ImageX to capture if there’s not enough disk space available to create the .wim file.
- All variables that previously needed to be edited inside the various script files can now all be configured within the task sequence, as task sequence variables.
- Disk Configuration will be handled by the MDT built-in Format and Partition disk step, you can adjust this to your needs.
- I’ve created a Custom Recovery tool for inside Windows RE, this means that the Windows Setup is no longer used for the restore process, but instead ImageX will be used. Using this method will delete all data on the Windows volume, and no “Windows.old”
folder will be created.
- I’ve configured a custom hotkey to directly start the custom recovery tool, this is [F1]. You can manually assign a different boot key by editing the MDT-WinRE.cmd script (look for /Bootkey).
- I’ve noticed a lot of people had issues once they had restored their image with a duplicated boot menu entry. This meant that upon startup they would see two identical boot menu entries for Windows 7, adding a boot delay of up to 30 sec. The
script that restores the recovery image onto the HDD will configure a new BCD meaning that this issue has been resolved.
- This time I’m also providing a pre-built WinRE.wim for both x86 and x64 machines. Note: these will be driver-less, however they will contain the CustomRE tool and have all the packages as required, you can use as reference to see what I did
if you want to create your own. These images are ready to use, unless you need to add drivers, or other language packs since I only choose to use the en-US language.
- The task sequence template has been revised and I’ve updated the descriptions of various tasks.
- It’s now no longer required to use Audit-Mode, hence I’ve removed providing a unattend.xml file; you can use the default unattend.xml file that’s created by MDT.
- If you need to use USMT to migrate data from the user profile(s) and possibly even restore it, this is all completely possible, however you will need to add this functionality yourself by adding the proper commands to the