Create Spanned Media

Published: October 22, 2009

Updated: October 22, 2009

Applies To: Windows 7, Windows Server 2008 R2

This topic describes how to create spanned media by using the Createspannedshares.cmd script to support computers that do not have a DVD-ROM drive. The script will split Setup files, including Windows® image (.wim) files, into individual parts that you can later burn onto multiple CD-ROMs. The script uses the following convention.

createspannedshares.cmd <Source> <Destination> [Media Size]

Where <Source> specifies a full path to the source files (the content of the product DVD and any additional source files), <Destination> specifies a path where the spanned media will be created; [Media Size]specifies the size of each piece of spanned media in megabytes (MB). Default is 640 MB.

Prerequisites

Before you can run this command, you must install Windows OEM Preinstallation Kit (Windows OPK) tools or Windows Automated Installation Kit (Windows AIK) tools on your technician computer. The script is located in the C:\Program Files\Windows OPK\Samples directory. The script requires the ImageX tool. Media-burning software is not included with either Windows OPK or Windows AIK.

To create spanned media on CD-ROM

  1. Create a source directory on your technician computer. For example, create the following directory:

    C:\span\source
  2. Copy the content of the Windows product DVD and any additional resource files to the source directory.

  3. Remove the read-only attribute on all files. In Windows Explorer, right-click the \Source folder, select Properties, and clear the Read-only check box.

  4. At a command prompt, run the spanning script with the appropriate values. For example,

    createspannedshares.cmd C:\source C:\span [Windows]
    The script creates a \Windows subfolder based on the Media Size value. Within the \Windows subfolder, the script creates individual subfolders (CD1, CD2, and so on).

  5. Create an image (.iso) file for each subfolder, and burn each one to an individual CD-ROM. To make the first CD-ROM bootable, use the Oscdimg tool and the appropriate boot sector file (Etfsboot.com for x86-based and AMD 64-based computers, and Efisys.bin for 64-based computers).

    For example, for x86-based computers,

    Oscdimg -n -b"C:\Program Files\<version> \Tools\PETools\x86\boot\etfsboot.com" C:\span\Windows\CD1 C:\span\Windows\CD1.iso
    where <version> can be Windows OPK or Windows AIK. For subsequent non-bootable images, you can omit the boot switch (-b); for example,

    oscdimg -n C:\span\Windows\CD2 C:\span\Windows\CD2.iso
    To build an AMD-EFI .iso file use the following command:

    oscdimg.exe -bC:\winpe-x64-efi\efisys.bin -pEF -u1 -udfver102 C:\winpe-x64-efi\ISO x64-efi-winpe.iso
    noteNote
    The Oscdimg tool is not supported on an Itanium-based computer running Windows Server 2003.

To create a spanned media on DVD

The Createspannedshares script does not split media to DVD. To manually replicate the script process, follow these steps:

  1. Create a source directory on your technician computer. For example, create the following directory.

    C:\span\source
  2. Copy the content of the Windows product DVD to the Source directory.

  3. In Windows Explorer, right-click the \Source folder, click s, and then clear the Read-only check box. This removes the Read-only attribute on all files.

  4. At a command prompt, split the Install.wim file using ImageX. Because DVDs hold from 4.7 to 8.5 gigabytes (GB), specify a larger size for each split .wim file than the Createspannedshares script creates. For example, the following command creates 4 GB files.

    imagex /split C: \source\sources\install.wim C:\span\install.swm 3000
  5. Determine how many .swm files were created in Step 4, and create new folders for each file. For example, if two .swm files were created, you would create the following directory, leaving the subdirectories intact:

    C:\span\DVD2\sources
  6. Delete c:\span\DVD1\source\sources\install.wim.

  7. Copy Install1.swm into c:\span\DVD1\source\ and Install2.swm into c:\span\dvd2\source\.

  8. Create an image (.iso) file for each subfolder, and burn each one to an individual DVD-ROM. To make the first DVD-ROM bootable, use the Oscdimg tool and the appropriate boot sector file (Etfsboot.com for x86-based and AMD 64-based computers, and Efisys.bin for Itanium-based). For example, for x86-based computers,

    oscdimg -n -m -b"C:\Program Files\<version> \Tools\PETools\x86\boot\etfsboot.com" C:\span\Windows\CD1 C:\span\Windows\CD1.iso
    where <version> can be Windows OPK or Windows AIK.

See Also

Concepts

Capture Images

Tags :


Community Content

bboot
tools for spanned media
There are tools out there that make spanned media much easier. The first that comes to mind is the media wizard by SmartDeploy. It'll capture the image and build ISOs (or you can burn it directly from the tool). <span><mtps:InstrumentedLink NavigateUrl="http://www.smartdeploy.com/Products/Downloads.aspx?sid=65ED8839-79CA-E011-A5C8-0050568C0003" runat="server" xmlns:mtps="http://msdn2.microsoft.com/mtps">http://www.smartdeploy.com/Products/Downloads.aspx?sid=65ED8839-79CA-E011-A5C8-0050568C0003</mtps:InstrumentedLink></span><div><br /></div><div>Another good one is GImageX, although it doesn't do any of the capturing. <mtps:InstrumentedLink NavigateUrl="http://www.autoitscript.com/site/autoit-tools/gimagex/" runat="server" xmlns:mtps="http://msdn2.microsoft.com/mtps">http://www.autoitscript.com/site/autoit-tools/gimagex/</mtps:InstrumentedLink></div>
Tags :

needhelp.....
product key error
Hi has anyone encountered a product key error when following these instructions:<br /><br /><br /><br /><br />This is like solving the DiVinici Code <br /><br />Jay Schleser | Edit | Show History <br /><br /><br /><br />Please Wait <br /><br /><br /><br />These directions are really ***. I have no idea how this made it into technet. Here is how I did it. <br />I edited the .cmd which is createspannedshares.cmd under the samples directory of Windows AIK. Even this cmd has errors. Moral of the story, if you want to create DVD's edit the cmd and change the following setting MaxMediaSizeInMB=4000 I chose 4gb.<br /><br /><br />Copy the contents of the source DVD to C:\win7source<br />Rename your base image .wim to install.wim<br />Copy your base install.wim to c:\win7source\sources and replace the default install.wim<br />Create c:\span<br /><br /><br />You then need to do the following syntax.<br /><br /><br />createspannedshares.cmd c:\win7source c:\span 4000<br /><br /><br />The 4000 is the size we want to split. Whatever you make this, edit the .cmd to match.<br /><br /><br />This will create c:\scan\cd1.iso and cd2.iso... and so on, depending in the size of your image.<br />These you will burn to DVD and be able to install your custom image from multiple DVD's.<br /><br /><br />I get an error during the install windows section: The product key entered does not match any of the Windows images available for installation. Enter a different product key.
Tags :

saiarcot895
Simplified Instruction
If you don't want to use the command, you can just use the imagex /split command to split the install.wim file. After the .wim file has been split, and you have two or more .swm files, place each .swm file in a different folder, keeping the first .swm file in the original folder. For example, first, place all of the setup files (boot, efi, sources, support, upgrade, autorun.inf, bootmgr, setup.exe) in CD 1. If you split install.wim into install.swm, install2.swm, and install3.swm, then keep install.swm in CD 1/sources, and create the folders CD 2 and CD 3. In CD 2, create the folder "source". Copy over the install2.swm into CD 2/source. Do the same for install3.swm. Follow the same steps if you want to create a DVD. This will work for installations that don't have language packs. I am not sure about those that have language packs, though. Hope this guide simplified things.
Tags :

Jay Schleser
This is like solving the DiVinici Code
These directions are really ***. I have no idea how this made it into technet. Here is how I did it.<div>I edited the .cmd which is createspannedshares.cmd under the samples directory of Windows AIK. Even this cmd has errors. Moral of the story, if you want to create DVD's edit the cmd and change the following setting MaxMediaSizeInMB=4000 I chose 4gb.</div><div><br /></div><div>Copy the contents of the source DVD to C:\win7source</div><div>Rename your base image .wim to install.wim</div><div>Copy your base install.wim to c:\win7source\sources and replace the default install.wim</div><div>Create c:\span</div><div><br /></div><div>You then need to do the following syntax.</div><div><br /></div><div>createspannedshares.cmd c:\win7source c:\span 4000</div><div><br /></div><div>The 4000 is the size we want to split. Whatever you make this, edit the .cmd to match.</div><div><br /></div><div>This will create c:\scan\cd1.iso and cd2.iso... and so on, depending in the size of your image.</div><div>These you will burn to DVD and be able to install your custom image from multiple DVD's.</div>
Tags :

pmcraig4573
i'm no super techie but these instruction are nonsence, needs proof reading before posting
this is a load of rubbish<br />what is "C:\span\DVD2\sources" why does it mention anything about this? whats it for?<br />why create DVD1 and DVD2 folders and then oscdimg in to CD1 and CD2 folders, doesnt make make sence to me<br />Plus the boot part didnt work anyway error message "can not find bootmgr"
Tags :

Alex-1
Thanks
Works like a charm! But cmd script needed for splitting DVD is 16kB and OPK needed for this script is 1.6GB :) One small problem: First part od WIM file is 350MB and other parts must be 350MB too.<br />
Tags :

ToddBeakey
These instructions do not make sense
The examples are all over the place, specifically the DVD spanned media. Can someone please clarify?
Tags :

Page view tracker