Using Imagex To Manage Windows Image Files

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Using Imagex To Manage Windows Image Files as PDF for free.

More details

  • Words: 2,301
  • Pages: 10
Using ImageX to manage Windows Image Files

Page 1 of 10

Using ImageX to manage Windows Image Files Abstract This lab is intended for IT professionals who are responsible for performing management and distribution of Windows Vista installation images. In this lab you will learn to use the Windows Advanced Installation Kit and the ImageX command line tool to capture and WIM images. You will then learn techniques for manipulating WIM images for modification and distribution. Finally you will learn ways to optimize the storage of WIM files. At the end of this lab you will be ready to incorporate ImageX into standard and BDD based deployments.

Objectives 

Use Windows System Image Manager to create a distribution share



Modify a Windows Vista staged image



Create a computer master image using ImageX



Modify a WIM file in an offline scenario

Scenario Your organization has standardized on Windows Vista as its desktop platform. You are responsible for creating a standard image that will be distributed to all clients. Once you have created the standard image it will be given to the distribution team who will be responsible for it deployment via methods including Windows Deployment Services (WDS), Image Based Setups (IBS), network & CD/DVD based installations.

Background Information The following virtual machines will be used to help you complete the lab” 

VistaLabs_DC1: Domain Controller running Server 2003, file server

Prerequisites You should be familiar with the following products or technologies before you begin this lab. 

Familiarity with Business Desktop Deployment



Understanding of Imaging Technologies such as Ghost or PowerQuest



Understanding of Microsoft deployment technologies including Remote Installations

Duration 60 minutes

For More Information Built by HynesITe, Inc www.hynesite.biz | see what’s possible

Using ImageX to manage Windows Image Files



Page 2 of 10

http://www.microsoft.com/technet/windowsvista/deploy/default.mspx

Support Information This lab is built and supported by HynesITe, Inc. See what’s possible at www.hynesite.biz.

Built by HynesITe, Inc www.hynesite.biz | see what’s possible

Using ImageX to manage Windows Image Files

Page 3 of 10

How To: Create an image of your Windows Vista installation using ImageX Important The following steps have been provided for your information but they will not be performed in the lab. In this lesson you will learn to use ImageX to create a standard desktop image as a WIM file. This enables you to distribute the image to teams which will use methods such as Image Based Setup, WDS, SMS 2003 or other methods defined in Business Desktop Deployment to deploy the image to client computers. Storing the image in a WIM file also allows offline editing of the image to add additional startup commands, drivers, or sysprep instructions.

 Prepare & image an existing Windows Vista Machine. As part of the standard imaging process for Windows Vista, the source machine must be prepared prior to capturing an image. As part of this process, values such as the machines unique identifier (SID) and its name are removed and the machine is configured so that it will run a mini-setup as part of its next boot process. The High-level steps to create a standard desktop image are as follows: •

Install Windows Automated Installation Kit (AIK) on the workstation.



Setup Windows Vista with all of the applications and settings you would like on all of the desktops in your department or organization.



Ensure WinPE CD is in your CD-ROM drive, or ensure the boot.ini file has been modified to allow the workstation to boot into WinPE.



Open a command prompt and enter the following command to prepare the machine for imaging. c:\windows\system32\sysprep\sysprep.exe /quiet /generalize /reboot /oobe Note At this point SYSPREP.EXE will now prepare the machine for imaging and then reboot it when it has completed the process. The /generalize switch is used to remove the unique information from the machine. The /oobe switch is used to launch the mini-setup wizard the next time the machine reboots.



Upon rebooting into WinPE, enter the following command to change to the C:\Program Files\Windows AIK\Tools\x86 folder cd /d "c:\program files\windows aik\tools\x86



Enter the following command to capture an image of the C: drive it and save it to C:\ ImageX /boot /compress maximum /capture c:\ c:\vistasysprep.wim "Vista – Sysprep image"

Built by HynesITe, Inc www.hynesite.biz | see what’s possible

Using ImageX to manage Windows Image Files

Page 4 of 10

Note IMAGEX.EXE captures the C:\ drive and saves it as a bootable wim file located in the root of the C: drive. In a real scenario, this WIM file would be stored on a network share, or a different partition on the same workstation. This process takes approximately 45 minutes. Upon completion of imaging, the workstation reboots and the mini-setup wizard is run

Built by HynesITe, Inc www.hynesite.biz | see what’s possible

Using ImageX to manage Windows Image Files

Page 5 of 10

Exercise 1 Modifying WIM Images Once a master installation has been captured to a WIM file, it may be necessary to modify the contents of the image. Unlike traditional image based technologies, WIM & IMAGEX.EXE provide the ability to modify an image without first dropping the image to a physical machine, modifying the contents of the machine and then recapturing it.

In this exercise, you will mount a WIM file, inject a new file and then commit the changes to the WIM file. For the purposes of the lab, and to reduce wait times, a WinPE WIM file will be used and the startnet.cmd file will be modified so that when WinPE boots it will automatically map a network drive and apply a WIM image to the local drive. The process for injecting a file into a WIM image of Windows Vista is the same.  Mount an image with read/write permissions using ImageX In this task you will use ImageX to mount an existing WIM file to an empty folder. This will then allow you to use standard file tools such as Windows Explorer to add, remove or modify the files contained in the image file. Perform the following exercise on DC1 1. Log on to DC1 as [email protected] with a password of P@ssw0rd. 2. Open a Command Prompt window and then change to the “c:\Program Files\Windows AIK\Tools\PETools directory 3.

In the Command Prompt window, type the following command and then press ENTER.

COPYPE X86 c:\WinPE 4. Using Windows Explorer, navigate to the C:\WinPE folder and review the content of the folder. Notice the C:\Winpe\Mount folder. This folder is used to mount the WIM files for viewing or modifying. Note: This command creates the required directory structure to enable customization of Windows PE and adds the necessary components to allow you to create a bootable ISO image which can be burned to a CD-ROM. 5. Still in the Command Prompt window, type the following command and then press Enter. ImageX /mountrw c:\winpe\winpe.wim 1 c:\winpe\mount

 Modify the contents of the WIM file With the WinPe.WIM file successfully mounted, you will now use standard windows tools to modify the Startnet.cmd file contained within the WIM file. You will modify the Startnet.cmd to map a network drive and then apply a WIM file to the local machine.

Built by HynesITe, Inc www.hynesite.biz | see what’s possible

Using ImageX to manage Windows Image Files

Page 6 of 10

1. Once the image has been successfully mounted, open Windows Explorer and navigate to the C:\winpe\mount\windows\system32 folder and locate the startnet.cmd file. Open it with Notepad. 2. Add the following commands on separate lines to the Startnet.cmd file then save the changes map r: \\dc1\build$ r:\ImageX /apply "r:\basebuild\core.wim" 1 c: Note: this command is provided an example but does not reflect the lab environment.

Built by HynesITe, Inc www.hynesite.biz | see what’s possible

Using ImageX to manage Windows Image Files

Page 7 of 10

Commit the changes to the WIM image You will now save the changes that have been made to the WIM file in the previous tasks. 1. Return to the command prompt and enter the following command to commit the changes to the WIM file ImageX /unmount /commit c:\winpe\mount 2. Once the changes have been successfully committed, enter the following command. Once complete note the time stamp on the file shows that it has just been updated. dir c:\winpe\winpe.wim

 Confirm the changes were saved in the WIM IMAGEX can also be used to mount a WIM file in a read only mode. In this exercise this functionality will be used to confirm that the modifications to the Startnet.cmd file have been saved in the WIM file.

1.

At the command prompt, enter the following command to mount the c:\winpe\winpe.wim file in read only mode. Enter the entire command on a single line. ImageX /mount c:\winpe\winpe.wim 1 c:\winpe\mount

Note: In the preceding command, the number 1 is used to signify the index number of the image to be mounted. A single WIM file may contain multiple images, each one being index 1, 2, etc. Only one image may be mounted to a single folder at a time. 2. Open the c:\winpe\mount\windows\system32\startnet.cmd file using Notepad and confirm that the map network drive and ImageX commands are now present. 3. Return to the command and enter the following command to unmount the winpe.wim file ImageX /unmount mount

Built by HynesITe, Inc www.hynesite.biz | see what’s possible

Using ImageX to manage Windows Image Files

Page 8 of 10

Exercise 2 Using Other ImageX Command-Line Switches A legacy server is currently being re-provisioned at a remote site to be used as a network build server for a Windows Vista pilot deployment. Unfortunately the server only has a CD drive and the local administrator has requested that the Vista Install WIM file be provided on CD. In this exercise you will use ImageX to split an existing WIM file into multiple parts of a predetermined size. ImageX.exe and the WIM file format allow technical staff an enormous range of options when it comes to managing & manipulating images. The following exercise highlights a number of the command line options for ImageX and how they can be used in typical scenarios.

 Use Xmage to split your image into multiple files for burning onto CDs In this task you will use ImageX to split an existing WIM file into 600Mb segments so that they can be distributed using standard CD-ROMs. 4. Open a command prompt and change to the C:\Program Files\Windows AIK\Tools\x86 directory. Enter the following command to view the existing install.wim and verify its size. ImageX /info E:\ sources\install.wim Note the Part Number and TOTALBYTES values 5. Enter the following command to create a new folder to store the files in and then split the existing WIM file. md e:\sources\split ImageX /split E:\sources\install.wim e:\sources\split\install.wim 600 This process will take approximately 5 minutes to complete 6. Once the image split has been completed, review the contents of the e:\sources\split folder and note the size of the install.wim files. Enter the following command at the command prompt to retrieve the image information from the WIM file and compare the Part Number value of the new file to value returned for the original install.wim ImageX /info e:\sources\split\install.wim

Built by HynesITe, Inc www.hynesite.biz | see what’s possible

Using ImageX to manage Windows Image Files

Page 9 of 10

 Manipulating images & WIM files This exercise you will learn how it is possible to store multiple images in a single WIM file and how those images can be manipulated. For performance purposes, this exercise will use a directory of files, as opposed to an entire operating system image. 7. Open a command prompt and change to the C:\Program Files\Windows AIK\Tools\x86 directory. Enter the following command as a single line to capture the E:\Sources\packages folder to a WIM file named sample.wim. ImageX /capture /compress maximum E:\Sources\packages e:\sources\packages.wim "image 1 – distribution share packages" 8. In order to confirm that the files have successfully been saved in the packages.wim file, enter the following command to view a file listing of the image ImageX /dir e:\sources\packages.wim 1 9. After the original WIM was distributed, a request was received to add an additional directory to the file. Enter the following command as a single line to append a second image file to the existing packages.wim file that contains the E:\Sources\packages ImageX /append "E:\Sources\out-of-box drivers" e:\sources\packages.wim "image 2 – distribution share drivers"

10. Now that the WIM file has been updated, you would like to get a listing of the images that it now contains as well as the total number of files and directories. Enter the following command and then review the output ImageX /info e:\sources\packages.wim 11. After confirming that the packages.wim file now contains two separate images, you would like to test that you can extract the files from the second image before you distribute it. Enter the following commands to create a new folder and then extract the contents of the second image to the new folder md c:\wimdemo ImageX /apply e:\sources\packages.wim 2 c:\wimdemo Review the contents of the c:\wimdemo folder to confirm that the files have been extracted from the WIM file then delete the directory

Built by HynesITe, Inc www.hynesite.biz | see what’s possible

Using ImageX to manage Windows Image Files

Page 10 of 10

12. After reviewing the contents of the second image in the packages.wim file it has been decided that the second image should be maintained as a separate WIM file. Enter the following command to export the second image to a separate WIM file ImageX /export e:\sources\packages.wim 2 e:\sources\drivers.wim "distribution share drivers" 13. Now that the second image has been successfully exported from the packages.wim file, it can be deleted from the original WIM. Enter the following command to delete the second image. ImageX /delete e:\sources\packages.wim 2

Built by HynesITe, Inc www.hynesite.biz | see what’s possible

Related Documents