Thursday, April 3, 2008

Deploy an image to a computer

Deploy an image to a computer

This is part 6 of a 6 part series that will give you information on capturing and deploying images using ImageX. In this part, you will deploy a captured image.



  1. Boot the system using a bootable disk containing WinPE and ImageX. The bootable disk can be either CD or a USB disk. The boot process will take several minutes.
    Note: If you want access to an external USB drive (such as one that holds the image you want to deploy), plug it in right after the boot process has begun. If you don’t plug it in before WinPE boots, you probably won’t be able to access the drive once WinPE completes the boot process.

  2. When the boot process is complete, you’ll have a command prompt on the X:\ drive where you can enter command-line commands. The following drives may be available. Enter the Drive letter with a colon (C:) to see what you can see. When done, enter X: to return to the X: drive.
    C:\ This is the original C: drive
    D:\ CD/DVD drive
    E:\ If you booted from a USB disk, this is it.
    F:\ Extra drive (such as portable USB drive)
    X:\ This is a RAM disk created by WinPE
    The format of the ImageX command when deploying an image is:
    ImageX /apply “source of .wim file” “image name or image number” target
    · Source of .wim file. This is the full path and name of the file such as F:\Images\Myimage.wim
    · Image name or image number. When an image file is created, it can be named. Addtionally, multiple image files can be contained within an image file and images can be referenced by their number. The first image is 1, the second is 2, and so on. You identify the image name by the image name, or the image number, not both.
    · Target. This is the drive letter where you want the image deployed. It will most commonly be C:\

  3. If you booted from a CD drive and you want to copy an image from a different DVD disk (but have only one CD/DVD disk drive), you first need to copy two files to the X: drive. Use the following two commands from the X: drive:
    Copy d:\imagex.exe x:\
    Copy d:\wimscript.ini x:\

  4. Enter the following command to deploy the first image from a .wim file named MyImage.wim.on the D: drive in a folder named Images.
    Imagex /apply D:\images\Myimage.wim 1 c:

This will take a little time but really not that long. I've deployed imges about 2 GB from a DVD and it's only taken about 10 minutes.

Once you deploy the image, reboot, and answer the setup questions from sysprep's mini-setup program.



  • To get information on images contained within an image file, use the following command:
    Imagex /info “path and name of .wim file”

  • For example, to get information on a file named myimage.wim in a folder named images on the F: drive, enter the following command:
    Imagex /info F:\images\myimage.wim

  • If images are named intuitively you can easily identify them in the Name node ( ) of the output.

This is the end of the 6 part series on using ImageX to creat and deploy images.

Part 1 Download and Install Windows Automated Installation Kit (WAIK)
Part 2 Prepare the Windows PE Folders
Part 3 Prepare a Bootable CD
Part 4 Prepare a Bootable USB (optional)

Part 5 Run Sysprep and Capture an Image using ImageX
Part 6 Deploy an Image using ImageX

This information is valuable when preparing for the MCITP: Enterprise Support Technician exams.

Run Sysprep and Capture an Image

Run Sysprep and Capture an Image

This is part 5 of a 6 part series that will give you information on capturing and deploying images using ImageX. In this part, you will run sysprep on a system to prepare it to be captured.


    Run Sysprep


    If you are capturing only one image of a system for restoration purposes (not for cloning) you will not need to run sysprep. In other words, if there will never be two instances of the same computer image on the network, sysprep is not needed. However, if you want to join the computer to a domain you must run sysprep

    Warning! After running Sysprep, you'll need to reenter the key from your installation DVD. Make sure you have it available.

    1. Locate the sysprep program for your operating system. It is often in this folder: C:\windows\system32\sysprep\sysprep.exe, but it may not be there. If Sysprep is in this folder, browse to it and skip steps 2 and 3.
    2. If Sysprep is not in the sysprep folder extract it from the installation DVD. Insert the installation DVD for your operating system into your DVD drive.
      Warning! If you use Sysprep from a different OS, you will likely encounter problems which may make the image unusable. If the image is valuable to you, you should first capture it without Sysprep to ensure you can get back to square one if things go wrong.
    3. Browse to the X:\Support\Tools\ directory (where X: is the drive letter of your DVD drive). Right click the Deploy.cab cabinet file and select Explore. Copy the contents of the Deploy.cab to a folder on your C: drive. Browse to the folder.
    4. Double-click the sysprep.exe utility to launch it. Read the warning and click OK.
    5. On the Windows Vista Sysprep tool, select "Enter System Out-of-Box Experience (OOBE)", select "Generalize", and select "shutwdown" as the shutdown option. Click the OK button and after a moment, sysprep will complete and the system will shutdown.
      For the Windows XP Sysprep, select MiniSetup, Pre-activated, and PnP check boxes. Ensure the Shutdown choice is set to Shutown. Click the Reseal button. Read the information in the dialog box and click OK. After a moment sysprep will complete and the system will shutdown.
    6. When the captured image is deployed after running sysprep, you will need the installation key. Make sure this is accessible.

    Capture the image

    1. Boot the system using a bootable disk containing WinPE and ImageX. The bootable disk can be either a CD or a USB disk. The boot process will take several minutes.
    2. When the boot process is complete, you’ll have a command prompt on the X:\ drive where you can enter command-line commands. The following drives may be available.
      - C:\ This is the original C: drive
      - D:\ CD/DVD drive
      - E:\ If you booted from a USB disk, this is it.
      - F:\ Extra drive (such as portable USB drive)
      - X:\ This is a RAM disk created by WinPE
    3. The format of the ImageX command when capturing an image is:
      ImageX /capture “image path” “path of wim file” “name of the image” “description”
      Image path. This is partition or volume you want to capture. It will most commonly be C:.
      Path of .WIM File. The path and name of the new WIM file. For example, you can save the image as MyImage.wim in a folder named Images on the c:\ drive. The image file would be C:\Images\MyImage.wim. The folder must exist, but the .wim file will be created.
      If you have enough room on the drive you are capturing, you can save the image file to the same drive. In other words, if you’re capturing C:\ you can save the image file on the C:\ drive.
      Name of the image. This is free text and could be something like “Sales Desktop Image”
      Description. This is free text and could be whatever you like. To describe the image.
    4. Change the drive to the drive holding the ImageX program by entering the drive letter and a colon at the prompt as X:. If you booted from the CD drive, this would be D:. If you booted from the USB drive, this would be E:
    5. Enter the following command to capture an image named “SalesDesktop” to a .wim file named MyImage.wim.on the root of the C: drive.
      Imagex /capture c: c:\Myimage.wim “Sales Desktop” “desc”

    Depending on how much data is contained on the C:\ drive this can take from several minutes to over an hour. The “mins remaining” estimate is pessimistic at first giving a very long time to complete, but typically completes much quicker. If you save it to a local disk, it seems to be much quicker than saving it to an external USB disk.

    Once the image is captured, you can reboot your system and copy the .wim file to a DVD or an external USB drive. You can then deploy the image contained within the .wim using ImageX.




    • To get information on images contained within an image file, use the following command:
      Imagex /info “path and name of .wim file”
    • For example, to get information on a file named myimage.wim in a folder named images on the F: drive, enter the following command:
      Imagex /info F:\images\myimage.wim

    • If images are named intuitively you can easily identify them in the Name node ( ) of the output.

    You have prepared a system to be imaged with Sysprep and captured an image using ImageX. The next step is to deploy an image.

    Part 1 Download and Install Windows Automated Installation Kit (WAIK)
    Part 2 Prepare the Windows PE Folders
    Part 3 Prepare a Bootable CD
    Part 4 Prepare a Bootable USB (optional)

    Part 5 Run Sysprep and Capture an Image using ImageX
    Part 6 Deploy an Image using ImageX

    Create a Bootable USB Flash Disk

    Create a Bootable USB Disk

    This is part 4 of a 6 part series that will give you information on capturing and deploying images using ImageX. In this part, you will create a bootable USB disk drive from your prepared folders. You can use the USB disk to boot to WinPE.



    Warning! You will destroy all the data on your USB disk in these steps. Make sure you don’t have anything you can’t afford to lose stored on your USB disk before starting. Additionally, make sure you follow the procedure to accurately identify which disk is your USB disk. If you use the wrong disk when accessing the drive in DiskPart, you may erase all the data on the wrong disk, such as your hard drive. It could ruin your day!

    1. Insert your USB disk into your system. Use Windows Explorer to identify which drive letter your USB is using. You'll need this letter later.
    2. Launch a command prompt with administrative privileges. Click Start -> All Programs-> Accessories, right-click Command Prompt and select Run As Administrator.
    3. From the command prompt, launch the Diskpart tool with the following command:
      DiskPart
    4. In the DiskPart cool, enter the following commands :
      DiskPart
      List disk

    5. Identify which disk is your USB disk. For example, on one system I did this on, the C: drive is 150GB and the USB disk was 2GB. Diskpart showed Disk 0 as 149 GB and Disk 1 as 1968 MB. Clearly disk 1 is the USB disk.

    6. Assuming that Disk 1 is your USB disk, use the following commands to prepare your USB. If your disk is a different disk, substitute your number in the Select statement.
      Warning! If you select the wrong disk you will destroy all the data on the disk you select. For example, if you select the disk holding all the data on the C:\ drive, you will destroy all the data on this drive.
      Select disk 1 ‘ This select your USB
      diskClean ‘ This will erase all data
      create partition primary ‘ Creates one partition using all disk space
      Select partition 1 ‘ Selects the created partition
      active ‘ Makes the partition active
      Format fs=fat32 ‘ Formats the partition as Fat32 (takes time)
      assign ‘ Assigns a drive letter
      exit ‘ Exits DiskPart
    7. Enter the following command to copy all of the data from your prepared iso directory to the USB disk. Substitute the letter x:\ for the actual letter of your USB disk identified earlier. (You may need to use Windows Explorer or Disk Management to identify the USB drive letter).
      xcopy c:\winpe_x86\iso\*.* /s /e /f x:\
      At this point, you have a fully bootable USB drive.

    In the next part you'll create a bootable USB flash drive that has the same contents as the bootable CD created in this part.

    Part 1 Download and Install Windows Automated Installation Kit (WAIK)
    Part 2 Prepare the Windows PE Folders
    Part 3 Prepare a Bootable CD
    Part 4 Prepare a Bootable USB (optional)

    Part 5 Run Sysprep and Capture an Image using ImageX
    Part 6 Deploy an Image using ImageX

    This information is valuable when preparing for the MCITP: Enterprise Support Technician exams.

    Prepare a Bootable CD

    Prepare a Bootable CD

    This is part 3 of a 6 part series that will give you information on capturing and deploying images using ImageX. In this part, you will create an image file from your prepared folders and use it to create a bootable CD.



    1. Launch the Windows AIK PE Tools command prompt. Click Start -> All Programs -> Windows AIK -> Windows PE Tools Command Prompt.

    2. Create an iso image of the prepared Windows PE folders with the following command. oscdimg -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO
      c:\winpe_x86\winpe_x86.iso
      The entire command should be entered on one line. Since the source path has spaces, the quotes must be included. Enter a single space after …etfsboot.com, and after …\iso.

    3. The command will complete rather quickly. It will create an iso file named winpe_x86.iso in the c:\winpe_x86 directory.

    4. Use an image burning program to burn the .iso image to a CD or DVD. Note that burning an .iso image is different than copying the .iso image file to the CD. If you don't have an image burning tool, check out ImgBurn.
      ImgBurn is an easy to use program and well worth an optional donation. Once installed, you can just double-click on the .iso file and ImgBurn will launch. If you have a CD in the disk ready to burn, all you have to do is click a single button.

    5. Once you burn the .iso file to the CD, you have a bootable WinPE CD.

    In the next part you'll create a bootable USB flash drive that has the same contents as the bootable CD created in this part.

    Part 1 Download and Install Windows Automated Installation Kit (WAIK)
    Part 2 Prepare the Windows PE Folders
    Part 3 Prepare a Bootable CD
    Part 4 Prepare a Bootable USB (optional)

    Part 5 Run Sysprep and Capture an Image using ImageX
    Part 6 Deploy an Image using ImageX


    This information is valuable when preparing for the MCITP: Enterprise Support Technician exams.

    Prepare the Windows PE Folders

    Prepare the Windows PE Folders

    This is part 2 of a 6 part series that will give you information on capturing and deploying images using ImageX. In this part, you will prepare the folders used to create a bootable WinPE disk.


      1. Launch the Windows PE Tools Command Prompt. Click Start -> All Programs -> Windows AIK -> Windows PE Tools Command Prompt.
      2. Enter the following command at the command prompt:
        Copype.cmd x86 c:\winpe_x86
        This will create c:\WinPE_x86 directory structure and copy files into it. It will also modify the path so that you’ll have access to the peimg, oscdimg and imagex commands.
      3. Use the following command to add the ImageX program to your directory. ImageX is needed to capture, deploy and manage images. The entire command should be entered on one line. Since the source path has spaces, the quotes must be included.
        Copy “C:\Program Files\Windows AIK\Tools\x86\imagx.exe”
        c:\winpe_x86\iso
        If you entered the command correctly, it will respond with “1 file(s) copied.”
        Note: When typing in these long command line commands it’s very likely you’ll have a typo. Expect them and you won’t be disappointed. Common problems are missing spaces or missing quotes. In the previous command, there is a space between Program and Files, and between Windows and AIK. Quotes are used to identify the entire path.
      4. Install the Package Manager with the following commands. This will allow you to modify Windows image (.wim) files from your bootable disk.
        The XCopy command should be entered on one line.
        XCopy “C:\Program Files\Windows AIK\Tools\x86\Servicing”
        c:\winpe_x86\iso\Servicing\ /s

        If prompted if this is a file or directory, enter D for directory. If entered correctly, over 40 files will be copied.
      5. Enter the following copy command. As with other commands, this should be entered on one line.
        Copy %windir%\System32\msxml6*.dll c:\winpe_x86\iso\servicing
        This command will copy two files.
      6. Since you included ImageX in step 3 and the purpose of these steps is to capture images, you’ll want to include an exclusion list. This list will prevent ImageX from failing due to some files being locked.
        At the command prompt, enter the following command:
        Notepad
      7. Notepad will launch. Enter the following exclusion and compression exclusion lists.
        [ExclusionList]
        tfs.log
        hiberfil.sys
        pagefile.sys"
        System Volume Information
        "RECYCLER
        Windows\CSC
        [CompressionExclusionList]
        *.mp3
        *.zip
        *.cab
        \WINDOWS\inf\*.pnf
      8. Click File -> Save As. On the Save As dialog box, click Browse Folders and browse to the c:\winpe_x86\iso\ folder.
      9. In the File Name text box, enter “wimscript.ini” and click Save.

      You have created your folders that will be used to create a bootable disk. If you want to additional files to your bootable disk, you can add them to the c:\winpe_x86\iso folder. For example, you may want to create a batch file that makes it easier to capture or deploy an image.

      In the next part you'll create a bootable CD.

      Part 1 Download and Install Windows Automated Installation Kit (WAIK)
      Part 2 Prepare the Windows PE Folders
      Part 3 Prepare a Bootable CD
      Part 4 Prepare a Bootable USB (optional)

      Part 5 Run Sysprep and Capture an Image using ImageX
      Part 6 Deploy an Image using ImageX

      This information is valuable when preparing for the MCITP: Enterprise Support Technician exams.

      Download and install WAIK

      Download and install the Windows Automated Installation Kit (WAIK)

      This is part 1 of a 6 part series that will give you information on capturing and deploying images using ImageX. The focus of WAIK is with Windows Vista, but it can be used to capture and deploy other operating systems.

      WAIK includes the tools needed to create a bootable disk (CD or USB). You can boot to a WinPE OS and then use ImageX to capture an image. You can then deploy the image to another system



      1. Locate the Windows Vista Automated Installation Kit download page. Click here or if it moved, enter “Download Vista Windows Automated Installation Kit” to locate the current location.

      2. Download the following image file:
        vista_6000.16386.061101-2205-LRMAIK_EN.img

      3. Burn the .img file to a DVD. If you don't have an image creation tool, check out ImgBurn. Its a free download and worth a donation.
      4. Place the DVD into your DVD drive on a Vista system and launch it. If Autoplay doesn’t run automatically, right click the drive in Windows Explorer and select Open AutoPlay. On the AutoPlay dialog box, select Run StartCD.exe.
      5. Click on the Windows AIK Setup link in the menu on the left. The Windows Installer will launch.
        Note: The Windows AIK requires the .NET Framework 2.0 and MSXML 6.0 to be installed. If you don’t have it, the program will exit. You can install both from the Windows Automated Installation Page. You can then restart the Windows AIK Setup.
      6. On the Welcome to the Windows Automated Installation Kit Setup Wizard screen, click Next.
      7. On the License Agreement page, review the license agreement, select I Agree, and click Next.
      8. On the Select Installation Folder page, accept the default installation folder of C:\Program Files\Windows AIK\. To allow this to be available for anyone that logs onto your system, accept the default choice of Everyone. Click Next.

      9. On the Confirm Installation page, click Next. The WAIK will install.
      10. On the Installation Complete page, click Close.

      You have installed the Windows Automated Installation Kit (WAIK). The next step is to create the folders used to create a bootable WinPE image.


      Part 1 Download and Install Windows Automated Installation Kit (WAIK)
      Part 2 Prepare the Windows PE Folders
      Part 3 Prepare a Bootable CD
      Part 4 Prepare a Bootable USB (optional)

      Part 5 Run Sysprep and Capture an Image using ImageX
      Part 6 Deploy an Image using ImageX


      This information is valuable when preparing for the MCITP: Enterprise Support Technician exams.