Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Vista

Creating Basic Windows Images : Deploying Custom Images

- Windows 10 Product Activation Keys Free 2019 (All Versions)
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
7/26/2012 5:51:01 PM
Deploying WIM files is different than deploying binary-based images used by some other vendors. Binary images contain drive and partition information, which is needed to successfully start an operating system. WIM files are file-based images and do not include partition information. The file-based nature of the WIM files allows it to be applied in a nondestructive manner. For example, you may re-image a problematic machine without deleting the locally stored data. However, it is not a very practical solution because with the registry as part of the image, it will be necessary to reinstall any applications. That said, the lack of partition information in the image does mean that it is necessary to properly prepare the hard drive before applying the image.

1. Preparing the hard disk

Although any drive partitioning and formatting software may be used, DiskPart is included with Windows and is included with Windows PE by default. DiskPart is an interactive command line utility which can perform even more tasks than the graphical Disk Administrator. For the purposes of imaging, it can be used to create partitions, make partitions active, and format partitions.

DiskPart is a very powerful utility. Its most significant power comes from its ability to run its commands from an input file and thus be run from a script. The process of automating DiskPart begins with first creating a text file with all necessary DiskPart commands and secondly running DiskPart with the /s option to specify the text file (referred to as a DiskPart script file). In the following walkthrough, you will create and store the script file on the network share, along with the customized WIM file. The advantage is that any necessary modifications can be made in a single location, which makes this a much more manageable solution.

To properly prepare a disk to receive an image, you must perform the following tasks within DiskPart:


Select disk 0

The first step is to select the disk you wish to operate against. Disks begin numbering with 0, which would be the most common option. If necessary, you may use list disk to show the available drives for selection (if your system has a hidden OEM image partition you may find it listed as disk 0).


Clean

An optional step is to clear any existing partitions from the drive. This is a destructive option and should be used with care.


Create partition primary [size=XXXX]

If the drive has been cleaned or is new, a partition must be created. This command will create a primary partition which will extend to the full size of the drive. The size in megabytes of the partition may be specified by using the size option.


Active

This will simply mark the newly created partition as active. This is required if you wish to boot an operating system from this partition.


Format fs=ntfs

The format command in DiskPart will format the partition with the specified file system. This task may also be performed with the standalone format command.


Exit

Exit the user interface and close the DiskPart utility.

2. Walkthrough: Preparing a hard disk for an image

To use DiskPart to prepare a target computer's disk for imaging, follow these steps:

  1. From your deployment server, open Notepad and enter the following text in a new document:

    select disk 0
    clean
    create partition primary
    active
    format fs=ntfs
    exit

  2. Save the document on your images share (i.e. w:\images) as single_partition.txt.

  3. Boot the target computer to Windows PE.

  4. Once Windows PE successfully starts, map a network drive using the following command as a guide. When prompted for credentials, supply a user name and password with read permissions to the share.

    net use y: \\deploysvr\images

  5. Execute the following command on the target computer to prepare the local disk.

    diskpart /s y:\single_partition.txt

3. Applying the image

Once the disk of your target computer has been properly prepared, there are two methods to apply the image. One is to use the ImageX command line utility with the /apply option. The other is to use setup.exe from the Vista DVD. Both methods imply that the computer has been booted to an operating system which supports them, typically Windows PE.

Deploying with ImageX

ImageX provides a very efficient and simple method to apply images to a prepared disk. As a command line utility, ImageX may be scripted to perform a customized installation and provides the most flexibility and efficiency. The most significant downside to using ImageX is that it does not provide a method to perform in-place upgrades. However, when combined with other tools, such as Windows Easy Transfer or User State Migration Tool, user data and accounts can be maintained during the imaging process.

To apply an image with ImageX, simply specify the /apply option. The first parameter after the /apply option is the name of the WIM file which contains the image you want to apply. The second parameter is the image number or name. Keep in mind that a single WIM file may contain multiple images, so it's necessary to specify the image to be applied. If you chose to use image numbers, the image numbers begin with 1. Lastly, specify the location to apply the image. Typically, this would simply be a drive letter, but in some circumstances you may want to apply an image to a subfolder. For an example, see the section "Walkthrough: Applying an image with ImageX."

NOTE

If you don't know (or just can't remember!) which images are stored within a WIM file, the /info option of ImageX will list the images in a WIM file. Not only does it list the image names, but also their indexed numbers within the WIM file along with other information about the WIM file.

Deploying with Setup

Setup, the replacement for winnt.exe and winnt32.exe, may also be used to deploy images. Setup only accepts a few options as parameters. The one needed for the automated deployment process is the /unattend option, which allows an unattended answer file be specified. The unattend answer file specifies the image to use and the target drive to prepare. Setup may be used to perform a clean installation or an upgrade.

4. Walkthrough: Applying an image with ImageX

To apply a customized WIM file to a prepared hard drive with ImageX, complete the following step. Be sure that you have booted to Windows PE, prepared the hard drive, and mapped a network drive, as per the previous Walkthrough.

From the target computer, use ImageX with the /apply option, using the following command as a guide:

y:\imagex.exe /apply n:\images\vista_custom.wim 1 c:\

5. Automating the deployment

At this point you may be concerned about the amount of effort required to successfully deploy a captured image. You must:

  1. Boot to Windows PE.

  2. Map a network drive, if applicable.

  3. Partition and format the local drive if necessary.

  4. Run ImageX with appropriate parameters.

If you only plan to deploy one or two images per week, this may not seem like a significant amount of work. If you plan to deploy hundreds or even thousands of workstations, the process will need to be more automated. A simple technique to automate the process is to use a batch file. 

Other -----------------
- Creating Basic Windows Images : Capturing Custom Images
- Adobe Flash Professional CS5 : Importing Graphics - Importing Photoshop and Illustrator Files
- Adobe Flash Professional CS5 : Importing Graphics - Setting Photoshop Import Preferences
- Adobe InDesign CS5 : Creating and Running Scripts
- Adobe InDesign CS5 : Using Scripts - Exploring VBA
- Dreamweaver CS5 : Standard Server Behaviors (part 6) - Stored procedure/command/callable
- Dreamweaver CS5 : Standard Server Behaviors (part 5) - Dynamic elements
- Dreamweaver CS5 : Standard Server Behaviors (part 4) - Update Record, Delete Record & User authentication
- Dreamweaver CS5 : Standard Server Behaviors (part 3) - Go To Detail Page, Related Page & Insert Record
- Dreamweaver CS5 : Standard Server Behaviors (part 2) - Recordset Paging, Move To Specific Record & Show Region
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
Celebrity Style, Fashion Trends, Beauty and Makeup Tips.
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server