Technology.Life.Insight.

OS imaging using free Microsoft tools

Imaging

So now you have your reference PC built up exactly the way you want it? Fully patched with all applicable updates applied? All drivers and BIOS updates applied?Before you sysprep it do a bit of cleanup first.

  • Ccleaner does a great job of cleaning up many high traffic areas: browser caches, histories etc, temp files, logs, and registry settings.
  • Pagefile set properly? (system managed)
  • DEP, system restore, and anti-virus all set?
  • Run disk cleanup?

If you will be attaching imaged PCs to your network infrastructure your management and security policies will likely take care of many of the other settings you'd otherwise be concerned with.


WSIM (Windows System Image Manager) is the replacement for setup manager used in prior versions of sysprep. WSIM is used to create the autounattend.xml that sysprep will use to configure the target PC when it boots. Let me preface this section by saying that I truly appreciate the power of WSIM, but I much prefer the simplicity of the old school setup manager. It is possible to completely corrupt a good image with a problematic WSIM xml, even one that validates as ok. I never had any problems with the old sysprep process but hey, out with the old...


For the first use you will need to copy install.wim from the Sources folder on the Vista CD.If you want to use multicast with WDS then use the install.wim from a Server 2008 DVD. You may get an error in WSIM when opening the wim complaining about not finding wimgapi.dll. This dll lives in the <waik install\tools\<architecture> folder. You need to copy the appropriate version of this file to \system32 on the technician PC. So if you are running Vista x86 you need to use the x86 version of the dll otherwise you will get more errors. Once the wim is selected in WSIM you will be prompted to open the catalog file or create a new one. This will take a cool minute.


In the bottom left, expand the components container.



This process now becomes like Group Policy editing where the sky is the limit. I generally use 5 components which control settings very much like setup manager did. All further customization will be handled via GPOs or other management infrastructure.

  • MS-Win-Security-Licensing-SLC_neutral (pass 3)
  • MS-Win-Security-Licensing-SLC-UX_neutral (pass 4)
  • MS-Win-Shell-Setup_neutral (pass 4)
  • MS-Win-International-Core_neutral (pass 7)
  • MS-Win-Windows-Shell-Setup_neutral (pass 7)
Save your xml and copy it to the \system32\sysprep folder on the reference PC. Alternatively you can simply download a reference XML file and modify the code to suit your needs as well. From the command line run sysprep to generalize, enable the out of the box experience, shutdown, and perform unattended install using the xml you created:


sysprep /generalize /oobe /shutdown /unattend:sysprepdomain.xml


Sysprep will run through its routines and shutdown the reference PC. Insert your WinPE boot CD and attach your USB drive if you want to capture the image locally. You can map a network drive to push the image to but depending on your infrastructure this may take a long time.
Boot into PE and map a drive to a file server if you want to store your image there. Run the following imagex command to start the capture:


Imagex /capture /compress maximum /check c:\ (destination drive letter):\(new image name).wim “image description”

Example: imagex /capture /compress maximum /check c: x:\vista_image1.wim “New Vista Image”


Once the capture completes you'll be able to verify if your sysprep was successful when the reference PC reboots and begins the setup process. To deploy your new image to other PCs you can use WDS or deploy locally using your PE disk. If deploying locally, boot to PE then run diskpart from a command prompt to make sure the drive is set up properly first.

> Diskpart

> List disk

> select disk 0

> clean

> create partition primary

> select partition 1

> active

> format fs=ntfs quick

> assign letter=c

> exit


To deploy the image run the following command:

Imagex /apply x:\(image name).wim 1 c:

0 comments:

Post a Comment

Recent Comments

Popular Posts

Powered by Blogger.

Twitter Feed

.

.