In part one of this series, I introduced you to Sysprep, a tool used for duplicating hard disk images to new PCs. In that Daily Drill Down, I discussed some of the hardware issues that you’ll encounter and explained how to install the Sysprep tool. In this Daily Drill Down, I’ll continue the discussion by explaining what you need to know before running the Sysprep tool.

Before you begin
Before you run the Sysprep tool, you have a few choices to make. The biggest choice that you’ll have to deal with is what the client-side experience will be like. As you may recall from part one, although Sysprep is designed to help you duplicate a hard disk image, the disk image that you were duplicating was incomplete. For example, the PC that you created the image from had not been joined to a domain yet. Therefore, it stands to reason that if you create a disk image from a PC with an incomplete configuration, the configuration on the new PC you’re setting up will also be incomplete. There are two ways that the Sysprep tool can deal with the missing portions of the configuration on the new PCs.

By default, when you first boot a system to which you’ve copied an image file, the new computer will run the Sysprep tool. It can do this because it contains a Sysprep folder with a copy of the Sysprep tool, just like the original PC. When the Sysprep tool runs on the new PC, it will launch something known as the Mini Setup Wizard. The Mini Setup Wizard is similar to the Setup program that you use to initially install Windows 2000 on a new system. There are some differences, though. One big difference is speed. Because all of the necessary files already exist on the new PC, you won’t have to wait for a million files to be copied from the installation CD. Another big difference is that you’re asked fewer questions than you would be during a real setup. That’s because half of the configuration process has already been completed, and the Mini Setup Wizard only needs you to enter things like a computer name and a domain name.

The other option when using the Sysprep tool to prepare a client is to use a text file to fill in most of the blanks. Before you can really create an effective text file, though, you need to know the steps that the Mini Setup Wizard goes through. When the Mini Setup Wizard first runs, you’ll see the Welcome To Windows 2000 Professional Setup screen, followed by the End User License Agreement (EULA) screen. Both of these screens must be manually acknowledged.

Once you’ve gotten past the first two screens, you get into the real heart and soul of the Mini Setup Wizard. From here, you’ll see screens that ask you to fill in regional options, the user and company name, the product key number, the computer name, and the local administrator’s password.

Once you’ve entered this information, you may possibly be asked to enter some TAPI settings. However, you’ll only have to do this if a modem is installed in your system.

Finally, you’ll be asked to enter the date and time, followed by the network settings and the name of the workgroup or domain that you want to join (assuming that you’re on a network).

Creating an answer file
As you can see, it could turn into a lot of work answering all of these questions on every computer you’re setting up. This is where creating an answer file comes in. If you create an answer file, then you’ll never have to deal with most of these questions. Creating an answer file involves creating a text file named Sysprep.inf. This text file uses the same basic format as an .ini file. It contains section headings, keys, and values. Unfortunately, space doesn’t permit me to exhaustively cover all of the options that you can use in this text file. Therefore, I will discuss some of the more common and useful answer file parameters.

If you need functionality beyond what I’ve provided, you can find an exhaustive list of answer file options on the Windows 2000 CD. To access this comprehensive list, navigate through your Windows 2000 Professional installation CD’s directory structure and go to the \Support\Tools directory. Decompress the Deploy.cab file and open the Unattended.doc file. This file will show you the syntax for every available option that you can use in the Sysprep.inf file.

Coding the answer file
Now that you know a little bit about where to go for more information, let’s look at the basics of the Sysprep.inf file. As I mentioned earlier, the first thing that the Mini Setup Wizard attempts to do is to display a welcome screen followed by the end-user license agreement. Even though you don’t actually have to fill in any information on these screens, you do have to click the mouse to bypass the welcome screen and to accept the license agreement. While this may not sound like a big deal, it can be a nuisance to have to go through these steps if you have a lot of computers to configure. Therefore, I recommend configuring your Sysprep.inf file to force Windows to bypass the steps of the Mini Setup Wizard. To do so, start the Sysprep.inf file with these lines of code.

In this code segment, the UnattendedMode key tells Windows to run Setup in the full-unattended mode. This means that Setup won’t pause for anything, including errors. This line is optional, but it’s a good idea to use it if you’ve got a lot of machines to set up and you don’t want to have to worry about checking up on them. The OemSkipEula command tells the Mini Setup Wizard not to display the license agreement.


Note

Before I go any further, it’s important to point out that the file I’m showing you how to create is intended only for brand-new PCs that do not contain an operating system. If you need to upgrade from another operating system, such as Windows NT or Windows 9x, there will be other tasks that you’ll need to complete before addressing any of the questions that the Mini Setup Wizard asks. These tasks include such things as setting a page file size, upgrading the hard disk’s partitions to NTFS, and extending the partition, if necessary. These are only three items on a very long list. In part three, I’ll explain some other things that you’ll need to do when upgrading another operating system. For now though, I’ll assume you’re setting up a new PC.


With that said, here are some more commands that you might include in your Sysprep.inf file. Notice that each of the commands addresses one of the Setup questions I mentioned earlier.
 [GuiUnattended]
AdminPassword = ”password”
TimeZone = 35
OemSkipWelcome = 1
OemSkipRegional = 1

In the GuiUnattended section, there are four commands that address basic setup issues. First, I’ve used the AdminPassword command to specify an administrative password. This line only works if the administrative password was blank on the system that you used to create the master image file. Although this password only applies to the local system (this command doesn’t affect the domain administrator’s password), you might consider omitting the line and setting the password manually. The reason for this is that your password appears as readable text within your Sysprep.inf file. Anyone who happens to get access to a copy of this file can easily find out the administrative password used on all of the workstations.

The next command in this section is the TimeZone command. In this example, I’ve set the time zone to 35, which corresponds to the east coast of the United States. The code for the west coast is 4. 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 acquire them through the Unattended.doc file.

Below the TimeZone command are two other commands, OemSkipWelcome and OemSkipRegional. You’ll notice that both of these commands have a value of 1. A value of 1 is equivalent to Yes, while a value of 0 is equal to No. Therefore, the OemSkipWelcome=1 command tells Windows to skip the initial Welcome screen. Likewise, the OemSkipRegional command tells Windows to skip the portion of the Mini Setup Wizard that deals with the regional settings.
 [User Data]
FullName = ”Brien M. Posey, MCSE”
OrgName = ”Posey Enterprises”
ComputerName = new_computer

The next section that you’ll encounter is the [User Data] section, which provides the data for customizing the new system with things like a user name and computer name. As you can see in the code above, the FullName= command is the spot where you provide the name of the user who will be using the machine. The OrgName= section is used to specify the name of your company. Finally, the ComputerName= section is used for providing a unique computer name.
 [Identification]
JoinDomain = Bud2000

Below [User Data] is the [Identification] section. This section is used to tell the Mini Setup Wizard which domain or workgroup the system will become a part of. As you can see in the code above, I’ve used the JoinDomain= command to join a domain. There are commands that you can use to join a workgroup. However, if you’re going through all this trouble to use the Sysprep utility, then you’ve probably got too many machines for a workgroup anyway.
 [Networking]
InstallDefaultComponents = Yes

Beneath the [Identification] section, you’ll find the [Networking] section. In my example file, I’ve simply used InstallDefaultComponents = Yes. This command tells the Mini Setup Wizard to install the more common networking components. You can specify more specific commands to control exactly what gets installed, but space doesn’t permit me to do so here. If you need to know the syntax for these specific commands, you can acquire it from the Unattended.doc file.

Putting it all together
So far, I’ve covered most of the aspects of the Sysprep tool, but I’ve still left two big questions unanswered. First, how does the actual duplication work, and second, how do you tell the Mini Setup Wizard to use the answer file?

The reason that I haven’t really talked about the duplication process is that Sysprep doesn’t duplicate the hard disk. All Sysprep does is build an image file. You must then use a third-party utility to copy the image file and the Sysprep files to the new hard disk. Once on the new hard disk, you can run Sysprep again to begin extracting data from the image file.

So what about using the answer file? There are a couple of ways to use it. The easiest method is to copy the answer file to a floppy disk. Once you’ve copied the answer file to a startup disk, boot the new machine and insert the disk as soon as the Windows Setup screen appears. Windows will do the rest.

Conclusion
In this Daily Drill Down, I’ve explained that after creating a disk image, you can either answer configuration questions on the client side manually or you can provide the Mini Setup Wizard with an answer file. I then explained how to create such an answer file. Since we all have better things to do, using this file will definitely help save time if you have a large number of machines to duplicate. Just remember, the more thought you put into the planning of an imaging task, the less time you have to spend actually performing it.