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.
- 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
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.
- 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.
- 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.
- 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.
- Double-click the sysprep.exe utility to launch it. Read the warning and click OK.
- 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.
- When the captured image is deployed after running sysprep, you will need the installation key. Make sure this is accessible.
Capture the image
- 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.
- 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
- 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.
- 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:
- 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 (
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
This information is valuable when preparing for the MCITP: Enterprise Support Technician exams.