Sunday, 9 June 2013

Windows 7 Deployment - Part01 : Prepare the reference image with sysprep and ImageX


<<   Back to Index   >>next

Installation: Install Windows 7 on a reference machine. You should endeavour to build your reference Windows 7 in virtual environment. This guarantees your image will run any machine down the road.

Audi mode: the general practice is that all the customisation should be done under audit mode. Once you have installed Windows 7 on a reference machine, go to C:\system32\sysprep, start sysprep.exe. In System Clean Action, select Enter Audit Mode. Shutdown Options, select Reboot. Click OK.


Customization: After the reboot, click through (and enter the info where needed) the pages until you are back in Windows 7 desktop screen. Install the must-have software your organization requires, change the settings as desired, run sysrep again. This time, do NOT use Audit Mode. Use OOBE mode instead. Shutdown the machine afterwards.

Image capture - step 1: you can use MDT 2012 to capture the image. For me, ImageX is simple enough to use. Stick in your bootable WinPE USB pen drive which includes ImageX.exe, get ready to capture. If you want to know how to create a bootable WinPE USB drive, see Create Bootable WinPE USB Drive For Image Capture.

Image capture - step 2: Boot the reference machine from the bootable WinPE USB drive. You will get to X: drive straight away. If you run the dir command, you will realise this is the WinPE drive.

The syntax for image capture is something like:

  imagex /capture c: g:\image.wim "Windows7 Ent x64"

Note: the drive letters vary from case to case, especially when you are not imaging a VM. For instance, in one case, the image to capture is in c: drive, in another case, d: drive. In one case, I wasted quite a bit of time troubleshooting when I just started learning imagex, because I captured the wrong drive.

To summarize: in this case, c: is the drive I need to capture; I stick in another USB drive to save the image.wim file, and it happens to be assigned as g: , so I tuped in g:\image.wim; "Windows7 Ent x64" is the name. To find out which drive is which, just switch to each drive, c:, d:, e:, f:, and so on, and dir to see what's in there.

If you prefer to use network share to store your WIM file, you can use net use to map, say, z: drive to your network share, and save the image.wim to z:. Bear in mind that if you want to do so, you need to include (inject) the network driver in your bootable USB pen drive, as detailed in  Create Bootable WinPE USB Drive For Image Capture.

I tend to use USB drives to save my WIM image. The reason: you will need to inject network driver to the WinPE pen drive to be able to map the network share; this makes your USB WinPE drive hardware dependent. I have a few USB dirves to spare, hence I just save the image.wim file in a spare USB drive, and copy it somewhere else later on (less typing! I am lazy).

When the capture job is done, shut the reference machine down. You can use the following command to do the job. Or you can shut it down by brute force.


  wpeutil shutdown

ImageX also offers more advanced options such as /compress . Check the reference for details. I tried it before, but I tend to keep things simple and leave it out, because the WIM file is pretty small anyway.


Comment: The size of the WIM file is usually a few GB. In my case, just over 3 GB. You can deploy this standard image to your client Windows 7 machines, and MDT Task Sequence can include a step to inject device drivers to target different machine models. Many softwares can be included in the MDT task sequence to auto-install s/w packages to the client machines. Alternatively, you can leave some s/w installation to Active Directory group policy.

You can now see the advantage of Windows deployment using WIM file and MDT - it is versatile and customizable along the line. You can just have 1 reference WIM image, and create multiple Deployment Shares using MDT to accommodate different device drivers for different PC hardwares, or even 1 Deployment Share for multiple PC models, if you can manage all the configuration. It does not require much storage space. The hind side is that MDT can take time to master without someone takes you by hand and show a working case to you: you will be going through many tutorials, blogs and youtube videos to collect information, and each method used by all these system admins varies here and there. It takes time to try each setting/configuration out. Yes, I've gone through all that myself. In the following articles, I will share my knowledge and experience of MDT2012 with you. Hopefully it will make things easier for you.

Now. This is a lovely afternoon. Warm sunshine with a bit of breeze. I shall be going into the garden and see how my flowers are doing...

               <<   Back to Index   >>next

No comments:

Post a Comment