ZANEY123
09-28-2002, 04:00 PM
Automated Setup Options
If you plan to install Windows XP on one or two computers, running the Setup program from the CD is your best choice. But if you’re planning to upgrade an entire office full of computers, you can save a substantial amount of time by automating the installation. The two most popular options are
Unattended setup. This option uses a batch file and a script (called an answer file) to bypass the Setup program’s prompts and fill in answers automatically. You can choose from five unattended modes.
Disk imaging (cloning). In this option, you set up Windows on a sample computer and then run the System Preparation utility (Sysprep.exe), which removes the unique security identifier (SID). You can then use a disk cloning program such as Symantec’s Ghost (http://www.symantec.com/ghost)or PowerQuest’s DriveImage (http://www.powerquest.com/driveimage) to copythe entire partition to a new computer; when it starts up, it runs a Mini-Setup program that completes in 5–10 minutes instead of the hour or more that a full Setup requires.
note
--------------------------------------------------------------------------------
Large organizations with existing networks built around Windows 2000 Server or Windows .NET Server can deploy Windows XP on hundreds or thousands of machines with relative ease using Remote Installation Services (RIS) and Microsoft Systems Management Server (SMS). These options require substantial up-front preparation by information technology specialists, but the payoff can be dramatic. You can find more information about RIS at the Windows 2000/.NET Server Web site (http://www.microsoft.com/windows/server). SMS allows an administrator to manage and monitor installations from a central location. For information about SMS, visit http://www.microsoft.com/smsmgmt.
Installing the Deployment Tools
The Windows XP Professional and Home Edition CDs include a selection of utilities and Help files that make it possible to use the automated installation processes described in this section. The Microsoft Windows Corporate Deployment Tools are located in a compressed Cabinet file (a compressed archive that is similar to a .zip file but uses the .cab extension). Before you can use these utilities, you have to copy them to your hard disk.
From Windows Explorer, open the \Support\Tools folder on the Windows XP CD, and double-click Deploy.cab. Select all files in this compressed folder, and copy them to a folder on your hard disk.
tip - Keep support files together
--------------------------------------------------------------------------------
If you’ve already installed the Support Tools, why not keep the Deployment Tools in the same location? Create a new subfolder called Deploy in the %ProgramFiles%\Support Tools folder and use it to store the deployment utilities.
The following files are included in Deploy.cab:
Setupmgr.exe. This executable file opens the Microsoft Setup Manager Wizard, which is used for creating answer files. It includes ahelp file (Setupmgr.chm), which is accessible only from within the Setup Manager Wizard.
Sysprep.exe. This executable file runs the System Preparation Tool, which is used for creating and deploying disk images.
caution
--------------------------------------------------------------------------------
Do not run Sysprep.exe on any system unless you intend to make an image of that system. Sysprep is a powerful tool that removes unique security identifiers from a Windows computer. If you run it by mistake on a working system, you will wipe out the security settings on that computer and may suffer unintended consequences, such as losing the ability to access files in your user profile.
Setupcl.exe. A small program used by Sysprep.exe to create unique security identifiers (SIDs).
Deploy.chm. Microsoft Windows Corporate Deployment Tools User’s Guide, in Compiled HTML Help format, provides detailed instructions and technical information about the deployment process. You can double-click to browse its contents.
Ref.chm. Compiled HTML Help file that contains reference information about the utilities and support files used in the deployment process. You can double-click to browse its contents.
In addition, three specialized utilities that are intended primarily for use by computer manufacturers are included within the Deploy.cab collection on the Windows XP CD:
Cvtarea.exe. Used in conjunction with Convert.exe (the utility that converts a drive to NTFS format) to create an unfragmented placeholder file for NTFS system files. The file is overwritten by the Master File Table during the conversion to NTFS.
Oformat.com. An enhanced version of the Windows 98 Format.exe program (an MS-DOS application) that creates a FAT32 volume with clusters that are aligned optimally for conversion to NTFS format.
Factory.exe. Helper program used with Sysprep.exe to make changes to a standard configuration before delivering it to end users.
For more information about these files, read the descriptions in the Deployment Tools User’s Guide (Deploy.chm).
Using Answer Files for Automated Installation
The most tedious part of performing a clean Windows XP installation is waiting. At several points during the installation process, the Setup program stops and waits for you to fill in essential information—your name, the computer’s name, network settings, and so on. Instead of waiting around for those dialog boxes to appear, you can create an answer file —a text file that automatically fills in the blanks for you and allows Setup to continue unattended. An answer file can also contain answers to a number of questions that aren’t posed by the interactive Setup program, which means that you actually have much greater control over installations. You can use an answer file whether you install from the Windows XP CD or from a shared network folder.
The automated setup solutions we discuss in this chapter were designed for offices, but they may be ideal for you even if you only have one or two computers. If you’re a dyed-in-the-wool hardware tinkerer and you regularly strip your system to bare metal and rebuild it with new components, use an answer file to take the tedium out of rerunning Setup each time. If you store your favorite customizations in .reg files or save them using the Files And Settings Transfer Wizard, you can be up and running in no time.
Creating an Answer File
To create an answer file, open the Windows Setup Manager Wizard (Setupmgr.exe) and follow its prompts. Most of the wizard’s dialog boxes are self-explanatory, with fill-in-the-blank forms that match up neatly with questions that are familiar to anyone who has interactively run Setup from the Windows XP CD. If this is the first time you’re using the wizard, you’ll probably want to create a new answer file and designate it for Windows unattended installation. If you already have an answer file and you need to change one or more details in that file (such as the product key or computer name), choose the Modify An Existing Answer File option.
note
--------------------------------------------------------------------------------
The Windows Setup Manager Wizard on the Windows XP CD runs on Windows XP Professional or Home Edition and on Windows 2000. It will not run on any earlier version of Windows.
The following list describes some of the more interesting options:
User Interaction Level. This page, shown in Figure 2-4, lets you choose one of five options that control how much the user sees during installation (for example, you can hide Windows Setup pages for which you’ve provided the answers) and whether you want the user to be able to override the answers you provide in the answer file. If you choose anything other than the Fully Automated option, you can leave selected answers blank; this technique is useful when you want the user to provide specific information (such as a user name) during Setup.
Distribution Folder. If you plan to install from CD, you can ignore this option. However, if you want to install from a network share, you can specify it here; this option gives you the flexibility to add other files as well, such as drivers not found on the Windows XP CD.
Figure 2-4. Check the Description panel at the bottom of this dialog box to see how each script-based option works.
Computer Names. This page, shown in Figure 2-5, allows you to enter the name of each computer individually, or you can import a text file that contains the names. You can specify more than one computer name here if you want to use this answer file to automate installation of Windows XP on multiple computers. If you’re willing to accept computer names that follow no pattern, you can allow Setup to create each computer’s name on the fly by appending seemingly random letters and numbers to the first few letters of your organization’s name.
Figure 2-5. If you need to set up multiple computers, specify a group of names in this dialog box and then use the same answer file for each installation.
tip - Learn how to create custom names
--------------------------------------------------------------------------------
If you enter multiple computer names in the Setup Manager Wizard, you need to customize the batch file used to start the Setup program. Add the /udf switch after either Winnt32.exe or Winnt.exe, and copy the .udf file (which is automatically created by Setup Manager) to the same location as the answer file.
After you finish filling in the blanks in the Setup Manager Wizard, it creates an answer file and stores it using the name and location you specify. Saving the answer file to a floppy disk makes it especially easy to use if you plan to install from CD.
tip - Use descriptive names
--------------------------------------------------------------------------------
The Setup Manager Wizard uses Unattend.txt as its default file name, but you can choose a different name if you prefer. Descriptive names can be helpful if you create multiple answer files to handle different hardware configurations—you might choose Notebook.txt as the name of the answer file you use for portable configurations, for instance.
Customizing an Answer File
The easiest way to customize an answer file—if you simply need to modify some settings you made with Setup Manager—is to restart Setup Manager. On the wizard’s second page, select Modify An Existing Answer File and specify the file name.
But there’s much more you can do with an answer file; the Setup Manager Wizard guides you through only the most commonly used settings. If you want to get more creative with your automated installations, open Ref.chm, the online reference guide that is included as part of the Deployment Tools collection. This Compiled HTMLHelp file provides a complete reference to all the answer file parameters in the Unattend.txt section. The information is well organized and clearly presented, although its sheer bulk can be overwhelming. You might consider some of these additions or modifications:
Use the [Components] section to specify which accessory programs are installed. You can use this option to prevent distractions like the Pinball game from being installed, for example.
Consider adding Win9xUpgrade=Yes to the [Unattended] section if you’re upgrading computers that are currently running Windows 98 or Windows Me. Without these keys (which Setup Manager does not add), Setup installs Windows XP on the same partition as the existing operating system, but in a separate folder. This produces an improperly configured dual-boot system that’s practically guaranteed to cause problems later.
Use the [Win9xUpg] section to control how user accounts and passwords on Windows 95/98/Me computers are migrated to Windows 2000.
Edit the [SystemRestore] section to configure System Restore options, including the percentage of disk space reserved for saved configuration information.
Use the [Fax] section to configure the fax service.
Answer files are plain ASCII text files that follow a consistent organization and syntax. The file consists of section headers—a section header is a word enclosed in square brackets on a line by itself—followed by keys and values. Each key begins on a new line, and it’s usually followed by an equal sign and a value for the key. If a value contains any spaces, it must be enclosed in quotation marks. You can include comments in an answer file by putting a semicolon at the beginning of each comment line. The Windows XP Preinstallation Reference includes three sample Unattend.txt files that you can examine in more detail.
note
--------------------------------------------------------------------------------
In previous versions of the Setup Manager Wizard, passwords were stored in the answer file as ordinary text. In the Windows XP version of this utility, your passwords are considerably more secure. When you enter the Administrator password for the target computer, be sure to select the Encrypt Administrator Password In Answer File check box. This option eliminates the chance that a snoop can peek into the answer file and steal the password for the Administrator account.
Using an Answer File During Setup
To use an answer file, include the /Unattend switch (along with the file specification for the answer file) on the command line for Winnt32.exe, the Windows XP Setup program. For example, if you’re installing from the Windows XP Professional CD andyou want to use an answer file named Unattend.txt that’s stored on a floppy disk, enter this command line:
d:\i386\winnt32 /unattend:a:\unattend.txt
tip - Combine a CD and floppy for a clean install
--------------------------------------------------------------------------------
Of course, you can also use an answer file to automate the installation on a new computer—and you don’t have to enter any command lines at all. If your computer can boot from the Windows XP Professional or Home Edition CD, save the answer file on a floppy disk and name it Winnt.sif. Insert the CD and the floppy disk and turn on the computer. Setup runs from the CD and uses Winnt.sif as its answer file.
If you used the Setup Manager Wizard to create the answer file, the process of using the resulting Unattend.txt file is even simpler. Setup Manager creates a batch file using the same file name (but with a .bat extension) and location that you specified for the answer file. Simply navigate to the folder where you saved the answer file (usually the distribution folder, if you set one up, or a floppy disk) and open the batch file. If you copy the batch file, the answer file, or both from the location where Setup Manager originally stored them, you might need to edit the batch file to update the path information.
Unattended Setup stops unexpectedly.
Even simple errors in answer files can cause Setup to stop before it ever gets started—and you won’t get any hints about where the problem lies. If you receive a message saying that your Setup script file is "inaccessible or invalid," check each line to see that it follows the proper format. Be sure that all values with spaces are enclosed in quotation marks, and be especially vigilant for stray commas.
Using Automated Installations: The Simplest Way
If you have a small office—a few dozen computers or less—you don’t need to pass an MCSE (Microsoft Certified Systems Engineer) exam to become a Setup wiz. Instead, you can follow this simple, straightforward method for automating your installations:
Install Windows XP on one computer.
Install the Deployment Tools on the same computer.
Use the Windows Setup Manager Wizard to create an answer file. If you already have a network set up, use Setup Manager to create a distribution folder. Otherwise, tell Setup Manager that you’ll install from the CD.
Using the information in Ref.chm, edit the answer file you created to include any additional customizations you want.
If the computers you’re targeting for installation don’t have a working network connection, copy the answer file, the batch file, and the .udf file (if any) created by Setup Manager to a floppy disk.
At each computer, connect to the distribution folder (if you already have a working network) and run the batch file, or run it from the floppy disk. (If you specified more than one computer name in the answer file, you’ll need to append the specific computer name to the command line when you run the batch file.)
The process of creating an answer file should take a few minutes—an hour if you decide to customize it extensively. You can easily save 30 minutes or more on each unattended installation, compared to the time it would take to sit in front of the computer and respond to its prompts. That’s a healthy return on your investment of time.
Using Disk Imaging
Windows XP, like its predecessor Windows 2000, includes Sysprep, a program that allows you to install a system, complete with Windows applications, and then duplicate it to other systems. After the system has been duplicated, the end user starts up the new system and run either the Windows Welcome portion of Windows Setup (if you choose the Disk Duplication option) or an abbreviated "Mini-Setup" routine that requires only about five minutes to run (if you choose the Automating Mini-Setup option). Because Sysprep duplicates an entire hard disk partition, you can use it to copy complete systems that include additional customizations and installed applications.
note
--------------------------------------------------------------------------------
Why is Sysprep necessary? Unlike Windows 98 and Windows Me, each computer running any member of the Windows NT family (including Windows XP and Windows 2000) must have a unique security identifier, or SID. If two computers on a network have identical SIDs, the result is chaos. Because the Setup program automatically creates a unique SID for each Windows installation, cloning a running Windows XP system won’t work—the clone would have the same SID as the original computer. Sysprep solves this problem by removing the SID on the master system, before you create the clone. When you transfer the image to the new system and start it up for the first time, Sysprep generates a unique SID.
Sysprep might not be right for you. Although this utility makes it easy to duplicate fully configured systems, it has the following restrictions and limitations:
Most important, the master and target computers must have identical hard drive controllers, identical hardware abstraction layers (HALs), and identical BIOS versions. Although other components—such as modems, sound cards, network cards, and so on—need not be identical, this limitation effectively restricts the use of Sysprep to fleets of identical computers. If you have a varied collection of computers of different ages and manufacturers, chances are good that Sysprep won’t work for all of them.
You’ll need third-party software (or a hardware device) for disk duplication. Sysprep merely prepares the image for copying and then runs a version of Setup after the image has been copied to a new computer. But to actually make the copy, you’ll need a program such as Ghost (from Symantec) or DriveImage (from PowerQuest) or a disk-duplicating device.
The hard disk on the target computer must be at least as big as the one on the master computer.
The master computer on which you prepare the Sysprep partition must be a clean install with no user accounts or profiles and no encrypted data. The user will be able to set up accounts when he or she turns on the computer and completes the setup process.
If these restrictions aren’t a problem for you, you can follow these steps to use Sysprep:
Install Windows XP on a master computer. (Because you might go through this process several times before you get everything set up just the way you want, you should create an answer file and use it for setting up the master computer. See the preceding section, "Using Answer Files for Automated Installation.")
note
--------------------------------------------------------------------------------
Do not join a domain during this initial setup—even if you intend to do so later— because running Sysprep removes the SID that allows the computer to connect to the domain. Set up the master computer in a workgroup. When Windows Welcome or the Mini-Setup program runs on each target computer, you can choose to join a domain.
Log on to the computer using the Administrator account.
Customize the computer as desired, and install applications that you want to be included on all target computers.
Create a folder named \Sysprep on the system partition. Extract Sysprep.exe and Setupcl.exe from the Deploy.cab file in the \Support\Tools folder on the Windows XP CD and copy them to this folder.
Run Sysprep.exe. In a few moments, the system will shut down by itself (if it’s ACPI-compliant) or display a message stating that it’s safe to turn off the computer.
Duplicate the hard disk. Depending on the duplication method, you might need to remove the hard disk from the system or you might need to boot from a floppy disk that starts the third-party disk-duplication software.
When you start a computer that contains a duplicated disk (or, for that matter, when you turn on the master computer, if it still contains the master disk), Sysprep automatically
Detects Plug and Play devices.
Runs the Windows Welcome portion of Windows Setup, which lets you set up user accounts and activate Windows.
Deletes the \Sysprep folder and its contents.
Reboots the computer.
This entire process takes only a few minutes, much less time than Setup normally requires.
If you chose the Automating Mini-Setup option, the process takes slightly longer but is still quite speedy. You can automate Mini-Setup by creating an answer file to provide some (or all) of the requested information. Use the Setup Manager Wizard to create the answer file, being sure to select Sysprep Install on the Product To Install page. The file uses the same format, sections, keys, and values as an ordinary answer file. Settings that are unnecessary or inappropriate in the disk-imaging process are ignored. You must name the answer file Sysprep.inf, and you must place it in the \Sysprep folder before you run Sysprep.exe. Table 2-2 shows the information that Mini-Setup requests, along with the answer file sections and keys that you can use to automate the process.
Table 2-2. Answer File Keys for Automating Mini-Setup
Mini-Setup Requests This Information Unless You Use These Keys
Your agreement to the terms of the End User License Agreement (EULA) [Unattended] OemSkipEula
Regional settings [GuiUnattended] OemSkipRegional (provide settings in the [RegionalSettings] section)
Name and organization [UserData] FullName, OrgName
Product key [UserData] ProductID
Computer name [UserData] ComputerName
Administrator password [GuiUnattended] AdminPassword
Modem dialing information [TapiLocation] AreaCode, CountryCode, Dialing, LongDistanceAccess
Date, time, and time zone [GuiUnattended] TimeZone
Network identification [Identification] DomainAdmin, DomainAdminPassword, JoinDomain, JoinWorkgroup
:)
Jomama
10-01-2002, 12:22 AM
I think you should get 2 posts for that one.
Dude, that is a lot of typing. You must be zany!
But now we dont have to buy the book.
Seriously, thanks for some good info.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.