Вы находитесь на странице: 1из 16

1- Creation of unattended answer file for Windows 7

2- The installation of a Windows 7 machine with all the necessary programs

3- Installation of a WDS server

4- Capturing of the Windows 7 machine with WDS

The hardware and software that we need to complete the above steps are as follows:

1- A technician computer (to create the answer file)

2- Windows Automated Installation Kit (WAIK) for Windows 7 (to install on technician computer)

3- An installation computer (to install Windows 7 and necessary software)

4- The installation media for Windows 7 and setup files for softwares

5- A working WDS infrastructure


Figure 1: The necessary hardware and software

Lets start with the steps that I mentioned in the first list. First of all, I have to install WAIk on the technician computer. This piece of
software is used to create answer file for unattended installation. The computer can be a Windows 7, Vista or XP. The computer that I
will use is a Windows XP SP3 one.

“http://www.microsoft.com/downloads/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&displaylang=en” link is
where we can download the file called KB3AIK_EN.iso. After I download it, I burn the file on a blank DVD with a DVD-Burner
software and start the setup of WAIK. There are prerequisites to install WAIK on a Windows XP operating system but fortunately,
they are coming inside of the DVD as well. These are .Net Framework and MSXML setups. I install them first and then click on the
“Windows AIK Setup” link. After a few screen, I finished the setup (Figure 2).

Figure 2: WAIK setup screen

Now I can begin to create my new unattended answer file. To do this, I open the Windows AIK user interface (Start -> Programs ->
Microsoft Windows AIK -> Windows System Image Manager). The screen is composed of 5 parts; “Distribution Share” and
“Windows Image” on the left side, “Answer File”, “Properties” and “Messages” on the right side. To create the answer file, I have to
show an install.wim file on the “Windows Image” part. I right click the “Select a Windows image or catalog file” line on this part and
select “Select Windows Image” from the opening list, and then I select the install.wim file (\sources\install.wim) from Windows 7
installation DVD and press OK button. After this action, two folders (“Components” and “Packages”) appear under the “Windows
Image” part. We will do all the job via the “Components” folder actually in this part. To open a new answer file template, I right click
“Create or open an answer file” line under “Answer File” part and select “New answer file”. After all these, I have to see a scree
similar to Figure 3.
Figure 3: WAIK interface

I want to talk a little bit about the 7 passes which are seen under the “Answer File” part. These are related to the 3 installation phases
of Windows 7. Let me first introduce you the 3 installation phases and then the related 7 passes respectively.

3 phases of Windows 7 installation process:

1- Windows PE Phase: This is the first phase of Windows 7 installation and begins just after the computer boots with a Windows
7 DVD. Throughout this phase, language, time zone, currency type, keyboard type, installation disk selections are made. After the
selections by manually or via answer file, installation wizard copies the install.wim file to hard drive and installs the necessary files.

2- Online Configuration Phase: It starts after the script “Please wait a moment while Windows prepares to start for the first time”
appears on the screen. Throughout this phase, basic hardware support installations are made. If the Windows 7 installation is an
upgrade, all of the software and data upgradings are made during this phase. This is a duration without user interaction.

3- Windows Welcome Phase: This is the phase before user logon. Computer naming, user creation etc. are made on this phase.

7 Installation Passes:

1- windowsPE: Answer file settings for the windowsPE configuration pass are used to configure how the Windows Preinstallation
Environment behaves. Most of the settings needed for answer file is under x86_Microsoft-Windows-Setup.

2- offlineServicing: Within this phase, hotfixes, language packs, windows updates, additional drivers can be installed. Most of the
settings needed for answer file is under x86_Microsoft-Windows-Shell-Setup.

3- generalize: This pass is closely tied to using the sysprep /generalize command. We use this pass to create a basic Windows
image. After this pass, specialize pass is used to customize the basic image for different purposes.

4- Specialize: We use this pass to do system based customizations (i.e. network settings, domain membership etc). This pass
corresponds to the second part of the second phase (online configuration phase) of Setup.
5- auditSystem: This pass happens only when Setup is running in audit mode using the sysprep /audit command. Audit Mode is a
special mode that customizations are made on Windows installation. Customizations in this pass are made under system account
before any user logon.

6- auditUser: This is almost the same with auditSystem. The customizations in this pass are made under the user account after
logon process.

7- oobeSystem: This corresponds to the last phase of Windows installation process and is used for customizations in this phase.

Figure 4 can help you to understand the phases and passes:

Figure 4: Windows installation phases and passes

I will do the followings for my image:

a) There will be two languages for operating system GUI


b) During the installation process,only language selection will be made and computer name will be decided. All of the settings left
will be automatically answered by answer file.

c) All the necessary programs (Office, antivirus etc.) will be in the image.

d) Office 2010 will be on the image and rearm process will be applied.

e) The first logon is made by administrator account automatically.

f) Answer file will be deleted after the setup automatically.

g) The default user profile will be copied from administrator account profile.

Now I can create the answer file which will include the above items. For this purpose, I expand the Components folder under
“Windows Image” part, add the settings (which are detailed in Table 1) and enter the necessary values for these settings (I right click
the necessary setting and select “Add Setting to PassX …..” from the menu). After all the settings are added to the answer file, I
select Validate Answer File from the Tools menu and control whether any problem exists on answer file or not. If there is any, I can
see it on the Messages part of the interface. Table 2 is the final answer file that I created.

Note: The product key for Windows 7 that is shown in answer file is the default client KMS product key given by Microsoft
Company. It is only used for KMS activation. I gave this value to the product key setting therefore I can activate my Windows 7
operating system by KMS host machine in the future.

Table 1: Settings that will be on the answer file

Pass Setting Sub-setting Setting detail Value


windowsPE x86_Microsoft- - EnableFirewall true
Windows-Setup UserData AcceptEula true
FullName mstip
Organization mstip
X86_Microsoft- - InputLocale tr-TR
Windows- - SystemLocale tr-TR
International- - UILanguage tr-TR
Core-WinPE
- UILanguageFallback tr-TR
- UserLocale tr-TR
x86_Microsoft- - CopyProfile true
Windows-Shell- ProductKey 33PXH-7Y6KF-2VJC9-XBBR8-
Setup HVTHH
ShowWindowsLive false
TimeZone GTB Standard Time
x86_Microsoft- RunSynchronousCommand[Order=”1”] Action AddListItem
Windows- Description RunSynchronousCommand[Order=”1”]
Deployment Order 1
specialize
Path Net user administrator /active:yes
WillReboot Never
Credentials Password Pa$$w0rd
Username administrator
x86_Microsoft- - SkipAutoActivation true
Windows-
Security-SPP-
UX
oobeSystem x86_Microsoft- AutoLogon Enabled True
Windows-Shell- LogonCount 5
Setup Username administrator
OOBE HideEULAPage True
NetworkLocation Work
ProtectYourPC 1
UserAccounts Action AddListItem
(LocalAccount[Name=”Administrator”] Description Local Administrator
DisplayName Administrator
Group Administrators
Name Administrator

Table 2: Final answer file (unattend.xml file)

<?xml version=”1.0″ encoding=”utf-8″?><unattend xmlns=”urn:schemas-microsoft-


com:unattend”><settings pass=”windowsPE”><component processorArchitecture=”x86″
publicKeyToken=”31bf3856ad364e35″ versionScope=”nonSxS”
xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-
instance”><UserData><AcceptEula>true</AcceptEula>

<FullName>mstip</FullName>

<Organization>mstip</Organization>

</UserData>

<EnableFirewall>true</EnableFirewall>

</component>

<component processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″


versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>

<SetupUILanguage>

<UILanguage>tr-TR</UILanguage>

</SetupUILanguage>

<InputLocale>tr-TR</InputLocale>

<SystemLocale>tr-TR</SystemLocale>

<UILanguage>tr-TR</UILanguage>

<UILanguageFallback>tr-TR</UILanguageFallback>

<UserLocale>tr-TR</UserLocale>

</component>

</settings>

<settings pass=”oobeSystem”>

<component processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″


versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
<UserAccounts>

<LocalAccounts>

<LocalAccount wcm:action=”add”>

<Password>

<Value>UABhACQAJAB3ADAAcgBkAFAAYQBzAHMAdwBvAHIAZAA=</Value>

<PlainText>false</PlainText>

</Password>

<Description>Local Administrator</Description>

<DisplayName>Administrator</DisplayName>

<Group>Administrators</Group>

<Name>Administrator</Name>

</LocalAccount>

</LocalAccounts>

</UserAccounts>
<OOBE>

<ProtectYourPC>1</ProtectYourPC>

<NetworkLocation>Work</NetworkLocation>

<HideEULAPage>true</HideEULAPage>

</OOBE>

<TimeZone>GTB Standard Time</TimeZone>

<RegisteredOrganization>mstip</RegisteredOrganization>

<RegisteredOwner>mstip</RegisteredOwner>

<AutoLogon>

<Password>

<Value>UABhACQAJAB3ADAAcgBkAFAAYQBzAHMAdwBvAHIAZAA=</Value>

<PlainText>false</PlainText>

</Password>

<Enabled>true</Enabled>
<LogonCount>5</LogonCount>

<Username>administrator</Username>

</AutoLogon>

</component>

</settings>

<settings pass=”specialize”>

<component processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″


versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>

<ProductKey>33PXH-7Y6KF-2VJC9-XBBR8-HVTHH</ProductKey>

<CopyProfile>true</CopyProfile>

<ShowWindowsLive>false</ShowWindowsLive>

<TimeZone>GTB Standard Time</TimeZone>

</component>

<component processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″


versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>

<RunSynchronous>

<RunSynchronousCommand wcm:action=”add”>

<Credentials>

<Password>Pa$$w0rd</Password>

<Username>Administrator</Username>

</Credentials>

<Description>RunSynchronousCommand[Order=&quot;1&quot;]</Description>

<Order>1</Order>

<Path>net user administrator /active:yes</Path>

</RunSynchronousCommand>

</RunSynchronous>

</component>

<component processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″


versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>

<SkipAutoActivation>true</SkipAutoActivation>

</component>

</settings>

<cpi:offlineImage cpi:source=”wim:e:/sources/install.wim#Windows 7 ENTERPRISE”


xmlns:cpi=”urn:schemas-microsoft-com:cpi” />

</unattend>

After the creation of answer file, I save it with a name of unattend.xml. If an entry of <ComputerName></ComputerName> appears
on my answer file (which is not my case), I delete it by opening the file with Notepad and save it again. Because I don’t want the
installation wizard to give computer name automatically.