One of the great features of MDT 2010/2012 is the ability to create a media based deployment  – this media based deployment can be placed on a USB based memory device (HDD or Fob) or onto a DVD. This allows the MDT based deployment to run from this removable media which is great for badly connected environments or portable build requirements.

Many customers I work with like to use DVD media based deployment as MDT 2012/2012  automatically creates a .ISO file that can be burnt to DVD and in most cases this gives them up to 8.5 GB on a dual layer DVD – it’s also a cheap deployment mechanism. However there are some occasions where this amount of DVD space just isn't enough and a combination of image size and MDT distribution share content pushes the requirement for storage over the limit of the DVD. You could at this point switch to using USB based devices or you can read on and use the solution discussed in this post.

The DVD Exchange tool is an application designed to extend the DVD based media deployment to a second DVD. Before you get too excited – this doesn't mean that you can split the ISO created by MDT 2010/2012 across two DVDs – but instead allows you to shift the application install source (which is usually in the applications folder of the MDT distribution share and which can be a large amount of data) from the MDT generated media deployment (which we will call DVD1) to a second DVD (which we will call DVD2). DVD2 can then be used to copy the application source to a temporary location on the local hard disk during task sequence execution  – where you task sequence can then install the applications from (instead of from the applications folder on DVD1) – which in turn frees up space on DVD1 for bigger images or more drivers.

To achieve this a number of challenges need to be overcome:

Challenge 1 - we need to pause the task sequence and eject the MDT media distribution (DVD1) from which the task sequence is running

Challenge 2  -we need to manage the insertion of DVD2, run a script to copy the contents of DVD2 to a local folder on the hard disk

Challenge 3 - when the copy of data from DVD2 has taken place, we need to prompt for the re-insertion of DVD1 so that the task sequence can continue

The idea behind the DVD Exchange tool is that it allows you to create an MDT media distribution (DVD1) to which you then add a task to your task sequence to run the DVDExchange.hta (attached to this post). This HTA handles the ejection of DVD1 (the MDT media distribution) and prompts for DVD2 (pausing the task sequence). When DVD2 is inserted, DVDExchange.hta runs a script that you place on the DVD2 called cache.vbs (attached to this post) which copies all of the content from DVD2 to a cache folder on the local hard disk (C:\DVDCache). When this is complete the DVDExchange.hta then prompts for DVD1 to be re-inserted and the task sequence then continues. You can then add tasks (after the DVD exchange has run)  to install applications from the newly created data that was copied from DVD2 to C:\DVDCache

Steps for use:

1.  Create DVD2 (you can use the in-built DVD burning software provided with Windows 7 or your favourite DVD burning software – the DVD does not need to be bootable). Add your required application packages (these would usually be application install folders with the source for each application contained within each folder). Place the cache.vbs and DVD2.ID files (from the ADD TO ROOT OF DVD 2 folder in the zip file attached to this post) in to the root along with you application source folders. The root of DVD2 should look something like this:

image

The cache.vbs file (which is run by DVDExchange.hta) will copy all folders and data from the DVD2 to a folder on drive C: called C:\DVDCache and will then hide this folder.

2.  Copy the DVDExchange.hta and the Images folder (from the COPY TO MDT SCRIPTS FOLDER in the zip file attached to this post) to your MDT Distribution Share\Scripts folder. Note the DVDExchange.hta file and the Images folder need to be together

3.  Add a task to your task sequence to run the DVDExchange.hta at the point at which you want to create the cache (this is usually towards the start of the System Restore phase in the task sequence). You can achieve this by adding a RUN COMMAND LINE task to run %ScriptRoot%\DVDExchange.hta or %DeployRoot%\Scripts\DVDExchange.hta

DVDExchange 2

4. After the task that you created to run the DVDExchange.hta, add additional tasks to your task sequence to install the applications that will now be available in the C:\DVDCache folder (using this folder as your root path)

DVDExchange 3

You may want to consider adding a task to the end of the task sequence to delete the C:\DVDCache folder if you don't want the source to remain on the local hard disk.

5. Create a Media deployment folder in MDT by using the New Media menu option on the Media node in the Advanced Configuration node of the MDT Workbench. Run through the wizard to create a staging folder for the media deployment. Note – this does not actually create the media deployment at this time as you need to run step 6 to copy the files and create the .ISO file.

6. When the Media deployment folder has been created place the tag file DVD1.ID (from the ADD TO ROOT OF DVD 1 folder in the zip file attached) into the CONTENT folder  – then return to the MDT Workbench and right click the Media Deployment Share (it is shown in the MDT Workbench \ <Your_Distribution_Share> \ Advanced Configuration \ Media node as a CD icon and by default is called MEDIA001) and choose Update Media Content from the right-click context menu) – this will copy all of your files from your working distribution share to the media deployment folder and will create an .ISO file based on this folder structure - which can be burned to DVD – this will be DVD1 – when you have burned the .ISO file generated by MDT to a DVD, the root of DVD1 should look like this (notice the DVD1.ID file is in the root of the DVD because you added it to the CONTENT folder in the Media deployment folder):

DVDExchange5

You can now run the installation by starting your build from DVD1 – at the point in the task sequence where the DVDExchange.hta runs – the application will load.

DVDExchange1

You will be prompted to swap DVDs (DVD1 > DVD2 > DVD1) while DVDExchange.hta will manage:

  • Pausing the task sequence
  • Identifying the DVDs (from their DVDx.ID files)
  • Ejecting the DVDs
  • Running the cache.vbs script to copy all data from DVD2 to C:\DVDCache
  • Logging actions to C:\MININT\SMSOSD\OSDLOGS\DVDExchange.log

DVDExchange.hta will then exit when DVD1 has been re-inserted and the task sequence will continue

This post was contributed by Richard Smith, a Principal Consultant with Microsoft Services UK

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