A geeks guide for building and deploy the perfect Vista image

By arwidmark / March 31, 2006

This guide provides info on the steps necessary for building and deploy a Vista image


 



In this scenario I have used three computers for testing:


PC0001 – Technician computer, Tools, CD/DVD burner


PC0002 – Vista Master Installation


PC0003 – Deployment Target


 


The guide is divided in four parts


– Prepare a Windows PE 2.0 image with the Ximage tools


– Prepare a Vista installation and run sysprep


– Capturing the Vista Installation


– Deploying the Vista image


 


 


Part 1 – Prepare a Windows PE 2.0 image with the Ximage tools on the Technician computer (PC0001)


 



  1. Create a folder named C:\Winpe20 and copy the following file and folder from the Vista DVD to it.

    BOOTMGR (file)
    BOOT (folder)



  1. Create a subfolder folder named C:\Winpe20\Sources and copy the following file from the Vista DVD to it.

    SOURCES\boot.wim

 



  1. Create a folder named c:\Winpe20\Tools and copy the following files from December CTP Windows Driver Kit (found in the \wdk automated deployment tools\i386 folder) to it.

    ximage.exe
    xmlrw.dll

 



  1. In the c:\winpe20\tools folder, create a file named wimscript.ini with the following content.

 


[ExclusionList]


Hiberfil.sys


Pagefile.sys


“System Volume Information”


$RECYCLE.BIN


RECYCLED


 




  1. Change the boot image number to 1 in boot.wim using ximage by starting a command prompt and run the following commands

 


cd /d c:\winpe20\Tools


 


ximage.exe /boot /info c:\winpe20\sources\boot.wim 1


 


 


Note: This will change the default boot image to a generic WinPE 2.0 image already included in boot.wim


 



  1. Copy the oscdimg.exe file folder from a WinPE 2005 CD (found in \winpe folder) to c:\winpe20\tools

 



  1. Compile a new bootable Vista WinPE by starting a command prompt and execute the following commands

    cd /d c:\winpe20\tools

    oscdimg.exe -bc:\winpe20\boot\etfsboot.com -h -n c:\winpe20 c:\winpe20.iso

 



  1. Burn the c:\winpe20.iso file to a CD

Part 2 – Prepare a Vista installation and run sysprep on the Vista Master Installation computer (PC0002)


 



  1. Install Windows Vista 5270, either manually or using an answerfile (see my previously posted guide on how to do unattended installs with Vista)

 



  1. Logon as administrator and run the following command

 


c:\windows\system32\sysprep\sysprep.exe /quiet /generalize /shutdown /oobe


 


 


 


Part 3 – Capturing the Vista Installation on the Vista Master Installation computer (PC0002)


 



  1. Start the sysprepped computer and boot from the customized Windows PE 2.0 (including the ximage tool)

 



  1. Capture the Vista installation by executing the following commands


cd /d :\tools


 


md c:\Images


 


ximage /capture C: C:\Images\Vista-5270.wim “Vista 5270”


 


Note: The image file will be about 1.7 GB in size when capturing a clean Vista Install. is not X:, X: is the mounted boot.wim file.


 



  1. Copy the C:\Images folder (containing the Vista-5270.wim file) to C:\winpe20\ folder on the technician computer (PC0001). Either by connecting to PC0001 over the network while still in WinPE (net use) or by rebooting the computer into Windows Vista, allow the minisetup to run and then copy the file over the network while in the Vista GUI.



  1. On the Technician computer (PC0001) create a Windows PE 2.0 including the Vista-5270.wim image file by starting a command prompt and execute the following commands  

cd /d c:\winpe20\tools


 


oscdimg.exe -bc:\winpe20\boot\etfsboot.com -h -n -m c:\winpe20 c:\vista_5270.iso


 



  1. Burn the c:\vista_5270.iso file to a DVD

 


 


 


Part 4 – Deploying the Vista image


 



  1. Start a new computer (PC0003) and boot from the Windows PE 2.0 DVD (including the Vista image file).



  1. Partition and format the drive using diskpart/format by executing the following commands

          diskpart.exe


 


diskpart>select disk 0


diskpart>clean


diskpart>create partition primary


diskpart>active


diskpart>assign letter = C


diskpart>exit


 


format C: /fs:ntfs /v:system /q /y


 



  1. Restore the wim-file and fix the bootcode by executing the following commands


cd /d :\tools


 


Ximage /apply :\Images\Vista_5270.wim 1 C:


 


 


Note:  is not X:, X: is the mounted boot.wim file.


 



  1. Reboot and boot from the Windows PE 2.0 DVD once again

 



  1. Create a new Windows Vista operating system entry in the bootcode by executing the following commands


bcdedit /set {default} device boot


 


bcdedit /set {default} osdevice boot


 



  1. Reboot and allow mini-setup to run.

 


Done! You have now deployed a Vista Image 🙂

Deploying Windows 7 using MDT 2008 Update 1

In order to deploy Windows 7 using MDT 2008 Update 1, you have to do some modifications… documented right here…  🙂

Shorthand story is that you need to do 3 small changes in MDT 2008 Update 1

1.     ZTISupportedPlatforms.xml needs a definition for the new Platform Type:

All x86 Windows Seven“>
WHERE Version like ‘6.1%’ AND OSType=18 AND ProductType=1]]>


All x64 Windows Seven“>
WHERE Version like ‘6.1%’ AND OSType=18 AND ProductType=1]]>







 

2.     Unattend.xml template file must be modified. All the paths under must exist, simple fix is to remove the other lines (marked yellow).



C:\Drivers


X:\Drivers


D:\Drivers


E:\Drivers


F:\Drivers





 

3.      Change ZTIUserState.wsf to support Hard Link Migration

sBaseArgs = sBaseArgs & ” /config:””” & sUSMTPath & “\” & sXML & “”””

                        Else

      oLogging.CreateEntry “WARNING: Unable to find specified USMT migration XML file ” & sXML, LogTypeWarning

                  End if

                  End if

      sBaseArgs = sBaseArgs & ” /hardlink /nocompress

If bEstimate then

            oEnvironment.Item(“StatePath”) = sLocalStorePath

            oEnvironment.Item(“USMTLocal”) = “True”   

            sBaseArgs = sBaseArgs & ” /hardlink /nocompress

                  Else

                              oEnvironment.Item(“StatePath”) = sNetworkStorePath

                        End if

1 13 14 15
Page 15 of 15