Deployment Solution

 View Only

It's All About Sysprep 

May 12, 2009 11:48 AM

Sysprep is a great tool from Microsoft that enables us to customize our computers. With Sysprep we are able to build one Windows image and deploy it to many computers. Inside the image there is a reference for the computername and the Security Identifier (SID).

When you deploy an image with Altiris Deployment Solution or Ghost all computers get the same name and SID as the original computer where you took the image from.

In this series of articles, I'll explain how to create an Answer file for use when you setup a Windows computer after the computer is cloned, and run Sysprep tool to prepare a computer to be a sample computer (source disk) for cloning.

The Answer file can contain only general configuration not unique values on each computer. For instance, if you're going to deploy the image to all computers in the same time zone, it is good to configure a time zone in the answer file so that you don't have to set the time zone on each computer after you cloned them. But if you're going to deploy the image in different time zones, you should not configure the time zone in the answer file.

This series of articles is into 3 parts:

  • Clone Microsoft Windows XP using Sysprep, Part I: Introduction
  • Clone Microsoft Windows XP using Sysprep, Part II: Special Customization Options
  • Clone Microsoft Windows XP using Sysprep, Part III: Altiris Deployment Solution

Install Windows XP, service packs and update patches and setup the basic applications on the sample computer that you are going to use for the deployment job.

Extract the necessary Sysprep tool. Insert the Windows XP CD. Navigate to "CD-Rom Drive SUPPORTTOOLS" and extract deploy.cab to C:Sysprep. If you don't have Windows XP CD, you can download the Sysprep tool from Microsoft. http://www.microsoft.com/downloads/details.aspx?familyid=0C4BFB06-2824-4D2B-ABC1-0E2223133AFB&displaylang=en (Windows 2000 version)

Note: You have to use the Sysprep tool version according to the needed Windows version. For example, you should not use Sysprep for Windows XP on Windows Server 2003.

Run Setup Manager to create an Answer file. Double-click on setupmgr.exe.

On Welcome to Setup Manager,click Next.

On New or Existing Answer File, select Create new. Click Next.

On Type of Setup, select Sysprep setup. Click Next.

On Product, select Windows XP Professional. Click Next.

On License Agreement, select No, do not fully automate the installation. Click Next.

Now you can configure the general configuration in your environment. I'll show sample configuration.

On Name and Organization, enter the Name and the Organization.

On Time Zone, select the time zone.

On Product Key, enter the Windows product key if you have Windows corporate key (one key that can be installed on many computers). If you have an unique key on each computer, leave this empty.

On Computer Name, select Automatically generate computer name so that each computer after cloned and run sysprep, has an unique computer name (Auto-generated name).

On Administrator Password, leave as default.

On Workgroup or Domain, leave as default.

On Identification String, give some name to identify this sysprep image. It'll keep this information in the registry so you'll know that this computer was cloned from which Sysprep image. Click Finish.

Save the .inf file. This is the Answer File that you've configured. Save it in the same folder and click OK.

After the Answer File has been saved, click Cancel to exit Setup Manager.

You noticed the Sysprep's Answer file has been created in Windows Explorer.

The process is very easy and therefore I did not add the pictures.

What we actually need is a sysprep file.

When you have created the sysprep.inf file you can open it with notepad.

The text that you get will look like below:

;SetupMgrTag
[Unattended]
OemSkipEula=Yes
InstallfilesPath=C:\sysprep\i386

[GuiUnattended]
AdminPassword="password"
EncryptedAdminPassword=Yes
OEMSkipRegional=1
TimeZone=105
OemSkipWelcome=1

[UserData]
ProductKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
FullName="DinamiQs"
OrgName="DinamiQs"
ComputerName=*

[Display]
BitsPerPel=16
Xresolution=1280
YResolution=1024
Vrefresh=60

[TapiLocation]
CountryCode=31

[SetupMgr]
DistFolder=C:\sysprep\i386
DistShare=windist

[Identification]
JoinDomain=DOMAINNAME
DomainAdmin=ADMINISTRATOR
DomainAdminPassword=PASSWORD

[Networking]
InstallDefaultComponents=Yes

These are the default options. Let's see what they all mean! Below you see the same as above, but between { } I will explain what it means and what your options are.

;SetupMgrTag
[Unattended] {leave unattended}
OemSkipEula=Yes {skip the neduser license agreement}
InstallfilesPath=C:\sysprep\i386 {Value to find the files necessary. ( I alway's change this to C:\WINDOWS\ServicePackFiles\I386}

[GuiUnattended] {This means that there will no screens appear that needs to be answered manually}

AdminPassword="password" {Here you specify the administrator password that you want the computer to have after it is sysprepped. This password will be the local administrator password}

EncryptedAdminPassword=Yes { the password will be sended to the computer. If you say yes it will be encrypted. When you say No it will be flat text.

OEMSkipRegional=1 { 1 means skip the OEM reginal question. When you say 0, there will be a screen asking you in wich region your computer wil be}

TimeZone=105 { 105 means timezone gmt +1. or 35, which corresponds to the East Coast of the United States. The code for the West Coast is four. If you live in the United States, you can use 10 for Mountain time and 20 for Central time. If you need other time zone codes, you can find them in the Unattended.doc file}

OemSkipWelcome=1 { 0 gives a welcome screen. 1 suppresses the screen}

[UserData]

ProductKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX { give a valid volume licensekey}

FullName="DinamiQs" { this is the username value for the computeruser}

OrgName="DinamiQs" {this is the organization value in the computer Don't use spaces or special characters here}

ComputerName=* {here you can enter a value. If you set *, it will generate a computername existing out of the organization name (spaces and special characters not supported) then a - and 5 or more characters.

[Display]

BitsPerPel=16 {this is the colordepth default on the cloned computer. Used values are: 8, 16, 32}

Xresolution=1280 {this is the screen chosen resolution together with the option YResolution. Safe options are 800, 1024, 1280}

YResolution=1024 {safe options are 600 if 800 is chosen above, 768 if 1024 is chosen above and 1024 if 1280 is chosen above}

Vrefresh=60 {refresh rate of the monitor. leave it at 60. that is a safe rate}

[TapiLocation]

CountryCode=31 {31 is netherlands, set the appropriate country code.}

[SetupMgr]

DistFolder=C:\sysprep\i386 {add the same value you use in installfilespath.}

DistShare=windist {Do not change}

[Identification]

JoinDomain=DOMAINNAME {This will be the name of your domain without .local or .lan}

DomainAdmin=ADMINISTRATOR {Administrator name}

DomainAdminPassword=PASSWORD {administrator password}

[Networking]

InstallDefaultComponents=Yes {yes will give the NIC an DHCP address. No will ask for an IP address.

Now you have a working sysprep file.

In the next article I will show you various extended options so that you can customize every client very easy and fully automatic.

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Aug 06, 2009 09:03 PM

I found them!  Here are the links in case anyone else missed them: 

https://www-secure.symantec.com/connect/articles/its-all-about-sysprep-part-2
https://www-secure.symantec.com/connect/articles/its-all-about-sysprep-part-3

Aug 06, 2009 09:02 PM

Hello,

This article was great to come accross, this is exactly what I am focusing on right now.

Are the other articles in the series avaiable?  I can't find a link to them...

  • This series of articles is into 3 parts:
  • Clone Microsoft Windows XP using Sysprep, Part I: Introduction
  • Clone Microsoft Windows XP using Sysprep, Part II: Special Customization Options
  • Clone Microsoft Windows XP using Sysprep, Part III: Altiris Deployment Solution

Thanks! 

Ryan

Jul 06, 2009 04:23 PM

Good info, but I would note that when you sysprep your image I would leave:

AdminPassword=*

If you inject a sysprep you can overwrite a blank password, but if it is already set, you can't change it. At least that is my understanding.

May 13, 2009 06:14 AM

When using sysprep please be aware of a few issues:
• Sysprep is known for corrupting secedit.mdb, located in C:\WINDOWS\security\Database\
Workaround: we have a working copy of the secedit.mdb (extracted from clean build PC) and copy it to a PC after sysprep has finished and PC boots to windows for the first time. It is easily done from the Deployment Server.
• We are not setting screen resolution in sysprep, as most of the new screens will adjust to optimal resolution automatically and it will allow you to have just one sysprep answer file.
• Sysprep from Win SP2 and sysprep from Win SP3 work differently with the default user profile. So, if you changed your Windows image from SP2 to SP3 you will need to modify sysprep slightly for local admin account to be copied to a default user account:
Add to
[Unattended]
UpdateServerProfileDirectory=1

Andrey Shipov
Manchester, UK

May 12, 2009 01:46 PM

Far too many companies have this issue and don't even know it.  If they are lucky WSUS is the only broken piece they experience.  Don't get me started on the implications of VMware ESX, Windows Server and companies who don't use sysprep.  That would be a great follow-up article.  With VMware it's far too easy to just clone a working image without sysprep for all your server needs and in the process guarantee all sorts of problems down the road.

Related Entries and Links

No Related Resource entered.