Quick Deployment Tutorial for Windows Vista OEM and Microsoft Office Ready PC from a DVD

Microsoft April 2007

Introduction...... 2 Preparation...... 2 What you need:...... 2 Windows Vista OPK Setup...... 2 Create a personalized WinPE image...... 2 Windows Vista setup on the reference computer...... 2 Microsoft Office Ready PC Setup and Setup Finalization...... 2 Setting up Microsoft Office Ready PC...... 2 Image Capture in « Audit » mode...... 2 Image Capture in « OOBE» mode...... 2 Creation of the deployment DVD with WinPE and the captured images...... 2 Deployment DVD usage...... 2 Updating Vista Images...... 2 Appendix...... 2 config.xml...... 2 drivers.xml...... 2 autounattend.xml...... 2 menu.cmd...... 2 Introduction

This document is intended for System Builders. It describes a straightforward and simple way to build in 2 or 3 hours a DVD that will deploy Windows Vista and Microsoft Office Ready PC in around 10 minutes. It also describes a way to create a silent setup for Microsoft Office Ready PC to be deployed on already preinstalled machines (Windows Vista or Windows XP).

This document aims at the System Builders that never used Windows and Office OPK and that wishes to start using the kit without spending too much time on it.

A DVD will be attached to the document and will illustrate the step by step actions described in that document. It will be given as a ready to use proof of concept.

The OPK or « OEM Preinstallation Kit » offers multiple features to SBs, Partners and Enterprises. These features allow PC deployment from images versus the “old file mode” like in previous OS’s versions. This document focuses on the most simple usage of the OPK i.e. adapts to the SBs context and teach them how to deploy by DVD-ROM in less than 10 minutes. Other usages are obviously possible (Network, USB keys, Hard Disk cloning and so on) but will require the reader to dig in the OPK documentation and invest a few days for more personalization.

The example DVD only uses the 32 bits tools but we need to say that we would follow the same procedure if using 64 bits tools.

The method aims at building a boot DVD under WinPE that will propose a simple menu. From the menu, we will be able to format the Hard Disk and from then on deploy different Windows Vista images and Microsoft Office Ready PC. The DVD will also propose the silent automatic setup of Microsoft Office Ready PC on already preinstalled Windows XP or Vista machines. The method drills down in six steps:

1. Preparation 2. Set up vista on the reference computer 3. Set up Office 2007 and finalizing 4. Image Capture 5. Build the DVD based on WINPE and adding the captured images 6. Update the image (How to add new files, drivers and applications to the image)

Step 1 to 5 must be completed before any deployment under Windows Vista. Step 6 will be necessary for any Vista image update. Preparation

What you need:

 An OPK toolkit (shipped with the 3 units package)  The OPK Office Ready kit  A Vista OEM DVD (from the OEM kit)  A Windows XP or Vista machine with any ISO burning tool. This machine can be your own desktop PC and will be called the technician computer for the rest of this document.  An external USB2 Hard Disk NTFS formatted with at least 20G° of free space.  A “free from setup” reference PC on which Windows Vista will be installed by DVD (Bios Boot Setup set on DVD). This machine will be called the reference computer for the rest of this document.  An USB key with at least 64 Mb of memory

All the needed procedures for creation and demonstration are listed in the document. All the necessary batch files and executables are also available in the samples directory on the DVD root. In this part we will copy all necessary files to the external hard disk.

Windows Vista OPK Setup

In the next commands E: is the letter associated to the external hard disk on the technician computer (It could probably change according to your configuration).

 Install the Vista OPK on the technician computer  Connect the external hard to the technician computer  Copy C:\Program Files\Windows OPK\Tools\PETools\x86\boot\etfsboot.com to the external hard disk root (E:\).  Create autounattend.xml file (see document appendix) at the external hard disk root.

Create a personalized WinPE image.

 On the technician computer, click on Startup\All Programs \Microsoft Windows OPK and launch WINPE command line tools by using Vista administrative mode (mouse right click). The shortcut will open a command line that will be preconfigured with the proper path and environment variables. The default tools path is usually C:\Program Files\Windows OPK\Tools.

 At command line, type: copype.cmd x86 E:\MyWinPE. The script will create the proper WinPE architecture on the external hard drive.

 On the external Hard Disk, create E:\TempWinPE directory.

 Mount the WinPE image in the previously created directory, using command : Imagex /mountrw E:\MywinPE\winpe.wim 1 E:\TempWinPE

The following instructions will modify the mounted WinPE image.  Create the sub directory E:\TempWinPE\tools  Copy C:\Program Files\Windows OPK\Tools\x86\imagex.exe in the sub directory E:\TempWinPE\tools.

 Copy C:\Program Files\Windows OPK\Tools\x86\imagex.exe at the root of disk E:\.

 Copy menu.cmd and diskconf.cmd files listed in appendix in the directory E:\TempWinPE \tools

 Copy choice.exe that you can find on the DVD (samples dir.) in E:\TempWinPE \tools directory

 Edit the file E:\TempWinPE\Windows\System32\startnet.cmd and add the following lines : wpeinit X:\tools\menu.cmd

Save the file startnet.cmd

 From the command prompt, unmount the WinPE image et save the image by typing: imagex /unmount /commit E:\TempWinPE

 Replace the WinPE image file of the future DVD (boot.wim) by typing : copy E:\MyWinPE \winpe.wim E:\MyWinPE\ISO\sources\boot.wim Microsoft Office files copy

The Office product requires the setup of 3 components

1. Office Basic/SmallBusiness/Professionnal 2007 setup disk 2. Business Contact Manager setup disk The OfficeActivationAssistant for Microsoft Office Ready PC. This component will allow the final user to obtain a 60 days temporary key which allows the user to use Office during this trial period. This component is not shipped with the SB Office Kit. It will be made available for download from the Microsoft system builders website: http://oem.microsoft.com/officeaa 3. It is also possible to get that temporary key by connecting to the “office ready PC” website without using the activation assistant. In order to simplify these operations, we provided the necessary file on the DVD (Samples dir.) at the name: MicrosoftOfficeActivationAssistant.exe.

 In E:\MyWinPE\ISO on the external disk create a directory OfficePRO and another one called OfficeBCM .

 Copy the full content of the Basic/SMB/Professionnal 2007 CD on the external hard disk in OfficePRO directory. Create the config.xml file (see below) at the directory root.

 Copy the full content of Business Contact Manager CD on the external hard disk in OfficeBCM directory.

 Copy MicrosoftOfficeActivationAssistant.exe from samples directory of the example DVD d’exemple (or from the website) in E:\MyWinPE\ISO directory. It should be called MicrosoftOfficeActivationAssistant.exe  Create the file SetupOfficeReady.bat in the directory E:\MyWinPE\ISO with the content listed below :

REM Office Ready Silent Setup procedure TITLE Office Ready Setup REM Office PRO Setup OfficePRO\setup REM Business contact manager Setup OfficeBCM\setup /q REM activation assistant setup MicrosoftOfficeActivationAssistant.exe /s

As we also want our DVD to be a deployment tool for Office Ready on Windows XP or Vista preinstalled machines. We will also create an autorun DVD procedure.

 Create an autorun.inf file in E:\MyWinPE\ISO directory with the following content :

[autorun] open = SetupOfficeReady.bat

Deconnect the external hard disk for the technician computer. Windows Vista setup on the reference computer

The automatic Windows Vista setup with the OPK will permit a « manual operation free » setup by automatically including settings, company logos, address and support hours (compliance with the OEM license).

The automatic setup will require a special file called (unattended.xml). Create the file autounattend.xml listed in appendix (The Vista flavor you wish to install will have to be chosen during the first setup on the reference computer).

You can modify autounattend.xml file for adding your company, Address or support hours by adding the personalized section described below.

FABRIKAM FABRIKAM Gamer 510 9h-19h 12 34 56 78 90 www.fabrikam.fr C:\Windows\OEM\FABRIKAM.BMP

If you wish to include your logo, you will need to copy the BMP file in a directory on the reference computer, e.g. C:\Windows\OEM during the finalization step of the reference computer setup. You can also modify the file autounattend.xml for partitioning the hard drive. The autounattend.xml listed in appendix format the hard drive with one partition only. You can modify the partitioning modifying the section.

The following section creates 2 NTFS partitions on the hard drive  C:\ 50 Gigas octets  D:\ remaining usable space (using of the extend function)

1 20000 Primary Primary 2 5000 true false NTFS C 1 1 2 true NTFS D 2 0 true OnError

In this case you must replace this line in the menu.cmd set ImagesDir=D:\ by set ImagesDir=E:\

With 2 partitions the system will assign the letter E to the DVD drive.

Setup files can also be modified and largely personalized with the Windows System Image Manager tool (Windows SIM), but using this tool requires more documentation dig in and is not covered by this document.

When modified, copy the file autounattend.xml on the usb key.

On the reference computer, connect the USB key; then insert the Windows Vista OEM DVD in the drive. Start the PC by booting on the DVD and wait while setup finishes.

All Windows Vista OEM DVD versions (Home basic, Home Premium, Professional or Ultimate) has got the same content and can be used to preinstall any version of Vista (e.g. we can install Windows Vista Business with the DVD labeled Windows Vista Home Basic).

During Setup, a product key will be needed, at this step don’t enter any key and uncheck Automatically activate Windows when online then click Next. Click no at the next window. You will then need to choose the version of Vista you need to install.

As a System Builder, here are your choices:

 Windows Vista Home Basic Edition  Windows Vista Home Premium Edition  Windows Vista Business Edition  Windows Vista Ultimate Edition

Check I have chosen the Edition I have purchased and click Next. Wait while setup completes, at the end the machine will restart in « Audit » mode.

To do a fully automated pre-installation, you should avoid the previous step inserting the product key into the autounattend.xml file; The product key could be set inserting the following lines in the section just after the line :

XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Note: Replace the ‘X’s with an actual 5x5 “default” product key listed below

Business - 4D2XH-PRBMM-8Q22B-K8BM3-MRW4W Home Basic - RCG7P-TX42D-HM8FM-TCFCW-3V4VD Home Premium - X9HTF-MKJQQ-XK376-TJ7T4-76PKF Vista Ultimate - VMCB9-FDRV6-6CDQM-RV23K-RP8F7 Microsoft Office Ready PC Setup and Setup Finalization

The Audit mode allows to finalize the machine by letting manually add drivers and applications, you wish to install on your machine (antivirus, Office Ready PC,…).

During that step, if restart are necessary, you will need to use the sysprep command in audit mode without the generalize option selected. In audit mode, the sysprep window (see below) is always displayed on the desktop. You will only use this window to start and stop you machine during that phase.

Setting up Microsoft Office Ready PC

Connect the external hard disk. Launch a command line (with administrative rights). Go to the hard disk root and launch the command: MyWinPE\ISO\SetupOfficeReady.bat . Office Ready PC setup will automatically execute without any manual intervention. If you want to include your logo at this step, you need to copy the BMP file in a directory of the reference computer, e.g. C:\Windows\OEM\. This directory will have to be specified with the OEM information in the autounattend.xml automatic setup file. Images Capture

Image Capture in « Audit » mode

Reference computer being in Audit Mode, stop the machine in Audit mode but with generalize option.

Restart the machine under WinPE by using OPK Vista CD (labeled: Windows Vista preinstallation Kit for OEM (OPK). The machine BIOS need to be configured for DVD boot.

In the command line windows go to the external hard disk root, (should be E:\). (the list volume command from the diskpart utility will display the disk letters assigned for the machine).

Launch the command imagex /capture c: E:\MyWinPE\ISO\Vistaimage.wim "Audit Image"

A first image will then be captured to the external hard disk.

Image Capture in « OOBE» mode

Restart the vista machine

The reference computer still being in Audit mode, stop the machine in OOBE mode with the generalize option Restart the machine under WinPE by using the VISTA OPK CD (labeled :Windows Vista preinstallation Kit for OEM (OPK). The machine BIOS need to be configured for DVD boot.

In the command line windows go to the external hard disk root, (should be E:\). (the list volume command from the diskpart utility will display the disk letters assigned for the machine).

Launch the command imagex /append c: E:\MyWinPE\ISO\Vistaimage.wim "OOBE Image"

A second Windows Vista image will be captured on the external hard disk.

Deconnect the external hard disk. Stop the reference computer.

The external hard disk know contains Vistaimage.wim , a file that contains 2 Vista images :  One image in Audit mode which will allow you to deploy a machine on which you will be able to add any personalization needed (adding software, settings, and so on)  One image in OOBE mode which will allow you to deploy a machine that you can directly ship to your final customer. Creation of the deployment DVD with WinPE and the captured images

 Reconnect the external hard drive to the presetup machine  On the presetup machine, click on Start\All Programs \Microsoft Windows OPK and then launch command line for Windows PE tools in administrative mode (via mouse right click). Launch the following command : (if E : is the external hard drive associated letter on the presetup machine) oscdimg -n -m -bE:\etfsboot.com E:\MyWinPE\ISO E:\MyVista DVD.iso  Burn MyVistaDVD.iso image with any burning software (Warning , it is recommended to copy the file before burning on the local disk for better reliability).  You can now use the DVD . Deployment DVD usage

 The DVD obtained by the described operations will allow you to : o Deploy fresh new machines with Windows Vista and OfficeReady in usually less than 10 minutes, by : . Booting under WinPE and automatically start the deployment menu . Format the Hard Disk on the machine . Install Windows Vista + Microsoft Office Ready PC in audit mode (option to use if you want to make any modification (manual setup of applications, settings…). In that case, you will have to stop the machine in OOBE mode without the generalize option (useless here) before shipping the machine to the customer. . Install Vista + Microsoft Office Ready PC in OOBE mode (reseal) in that case the machine is shipped without having to be restarted by the technician. . Launch a WinPE maintenance console

o Setup Office Ready in silent mode on already preinstalled machines, Windows XP or Windows Vista.

The DVD attached to this documentation will allow to test and use deployments of Windows Vista Home Premium or Windows Vista Business images with Microsoft Office Ready OPK in Audit or OOBE mode. Updating Vista Images

The Vistaimage.wim file stored on the external hard drive will contain your personnalized versions of Vista. You can add files in Offline mode without the need to reboot and recapture an online machine : The 2 following operations : Add and Suppress drivers and files can be done simutaneously in an image.

Add / Suppress files in an image

 Connect the external Hard Drive to the Machine

 On the External Hard Drive, create the directory E:\wim_mount.  Mount the image by imagex /mountrw E:\MyWinPE\ISO\Vistaimage.wim 1 E:\wim_mount

 Warning, the operation will have to be repeated for each image stored in the Wim File. The image choice is done by specifying the image number to modify (1 to x) by using command imagex /mountrw .

 You can then manually add files to your windows Image by copying them in to E:\wim_mount

 If you are not sure of your modifications, unmount the image without saving the changes : imagex /unmount E:\wim_mount otherwise unmount the file with the save option , command: imagex /unmount /commit E:\wim_mount.

The new image version is ready to be deployed. You can from then rebuilt and burn a new DVD to deploy newly updated images.

Add / Suppress drivers in an image

The Package Manager (Pkgmgr.exe) utility allows the setup on one or multiple drivers in an offline Image. e.g. It allows you to add necessary boot drivers or update important drivers. Package Manager works with the “driver store”. This storage is used by windows Vista to setup new Plug and Play drivers. ”Driver Store” replaces the Driver.cab file from Windows XP. Driver install will necessitate to create an installation file with Windows SIM. In order to simplify that usage, we provided drivers.xml a sample file detailed in the appendix.

 Create a directory c:\drivers on the Preset Machine

 Copy the drivers you want to inject in the c:\drivers folder; the drivers must be in inf of sys format or in executable format

 Copy drivers.xml in c:\drivers. If you want to use another directory than c:\drivers . The file will have to be modified consequently.

 Connect the disk to the presetup machine.

 On the External hard drive create, E:\wim_mount.

 Launch a command line Start\All Programs \Microsoft Windows OPK and launch Windows PE command line in administrative mode (Mouse right Click). The shortcut will open a command line with all the preset environment variables.

 Go in C:\Program Files\Windows OPK\Tools\Servicing by using : CD C:\Program Files\Windows OPK\Tools\Servicing

This command will allow access to the « Service stack » library, used for Windows Vista drivers installation.

 Mount Windows Vista image by using imagex /mountrw E:\MyWinPE\ISO\Vistaimage.wim 1 E:\wim_mount

 Warning, the operation will have to be repeated for each image stored in the Wim File. The image choice is done by specifying the image number to modify (1 to x) by using command imagex /mountrw .

 Launch the command

Pkgmgr /o:"E:\wim_mount\;E:\wim_mount\Windows" /n:"c:\drivers\drivers.xml"

The drivers will be integrated to the driver store immediately. C:\Windows\Logs\CBS\CBS.log file will log the operation. A successful operation will show this at the last line of the log :

2007-03-25 22:15:45, Info CBS Pkgmgr: return code: 0x0

The code 0x0 is equivalent for succeeded.

 If you are not sure of your modifications, unmount the image without saving the changes : imagex /unmount E:\wim_mount otherwise unmount the file with the save option , command: imagex /unmount /commit E:\wim_mount.

The new image version is ready to be deployed. You can from then rebuilt and burn a new DVD to deploy newly updated images. Appendix config.xml

drivers.xml

C:\drivers autounattend.xml

1 10000 Primary true true NTFS C 1 1 0 true OnError true 0 1 OnError en-us 0809 en-us en-us en-us Audit diskconf.cmd

REM Selection of the first hard drive Select Disk=0 REM REM REM Fast cleaning of the hard drive Clean REM REM REM Creation of a new partition CREATE PARTITION PRIMARY SELECT PARTITION 1 REM REM REM Format partition FORMAT FS=NTFS LABEL="Vista" QUICK REM REM REM Make the partition bootable ACTIVE REM REM REM List system volumes LIST VOLUME REM REM REM Exit EXIT menu.cmd echo off set ToolsDir=X:\tools\ set ImagesDir=D:\ :START CD ToolsDir TITLE Sample of a Windows Vista deployement tool CLS echo. echo. echo This DVD is as example of the use of the OPK for deployment echo of Windows Vista and Microsoft Office Ready PC echo ======echo. echo. echo 1 Format the hard drive echo 2 Apply Vista in AUDIT mode echo 3 Apply Vista in OOBE mode echo 4 Start a WinPE console echo 5 Restart the system echo. echo. %ToolsDir%choice /C:12345 Choose an option ? SET INPUT=%ERRORLEVEL% IF %INPUT% EQU 1 GOTO PARTITION IF %INPUT% EQU 2 GOTO DEPLOY_Audit IF %INPUT% EQU 3 GOTO DEPLOY_OOBE IF %INPUT% EQU 4 GOTO WinPEPrompt IF %INPUT% EQU 5 GOTO REBOOT REM REM :PARTITION echo. echo. echo All data will be erased from the hard drive echo. echo. %ToolsDir%choice /C:YN Do you want to continue, Y=Yes, N=No SET INPUT=%ERRORLEVEL% IF %INPUT% EQU 2 GOTO START echo. echo. DISKPART /S %ToolsDir%diskconf.cmd %ToolsDir%choice /C:YN Do you want to continue, Y=Yes, N=No GOTO START REM REM REM :DEPLOY_Audit CLS echo. echo. echo Windows Vista will be installed on the hard drive echo. echo. %ToolsDir%choice /C:YN Do you want to continue, Y=Yes, N=No SET INPUT=%ERRORLEVEL% IF %INPUT% EQU 2 GOTO START %ToolsDir%imagex /apply %ImagesDir%Vistaimage.wim 1 C:\ echo. echo. %ToolsDir%choice /C:YN Do you want to continue, Y=Yes, N=No GOTO START :DEPLOY_OOBE CLS echo. echo. echo Windows Vista will be installed on the hard drive echo. echo. %ToolsDir%choice /C:YN Do you want to continue, Y=Yes, N=No SET INPUT=%ERRORLEVEL% IF %INPUT% EQU 2 GOTO START %ToolsDir%imagex /apply %ImagesDir%Vistaimage.wim 2 C:\ echo. echo. %ToolsDir%choice /C:YN Do you want to continue, Y=Yes, N=No echo. echo. GOTO START :WinPEPrompt CLS echo. echo. echo Type "exit" to close the WinPE console echo. echo. %ToolsDir%choice /C:YN Do you want to continue, Y=Yes, N=No SET INPUT=%ERRORLEVEL% IF %INPUT% EQU 2 GOTO START echo. echo. START echo GOTO START REM REM REM :REBOOT EXIT :END