Working with the Sysprep tool, part 1

Looking for a quick way to set up several PCs at once? Windows 2000 Professional provides the Sysprep tool to help with the process. In the first part of a two-part Daily Drill Down, Talainia Posey introduces you to Sysprep.

A tedious task you might encounter as a network administrator is the chore of setting up new systems. Where I used to work, it was common to have 20 or 30 new systems arrive at a time. Then came the work of manually configuring the systems for the network, loading antivirus software, installing the applications, and a variety of other setup-related tasks. It was easy to consume an entire day or more setting up the new systems. Today the manual setups are no longer an issue. Windows 2000 Professional provides a way for you to create an image file of a single PC and use that image to automatically configure other PCs. Although the process still requires some manual configuration on the new PCs, the process is much faster than setting up the new PCs from scratch. In this Daily Drill Down, I’ll show you how to use the Sysprep tool to streamline the process of setting up new PCs.

Before you begin
Before I start demonstrating how to use the Sysprep tool, I’d like to discuss some of the issues that you’ll face when setting up a PC from an image file. At first, setting up a new PC based on an image file may not sound like a big deal. After all, an image file is simply a compilation of all the files that exist on the master PC. However, while a file-level duplication from one PC to another would usually work for some operating systems (such as in a DOS environment), it doesn’t work in a Windows 2000 environment unless you abide by a few guidelines.

Keep in mind that while you are just copying files, some of the files that you’re copying contain detailed information about the original PC. For example, some of the files in question tell Windows what hardware exists on the PC and how that hardware is configured. Remember, just because your original PC has a 3Com network card in the first PCI slot and the card is set to use IRQ 10, that does not mean that the other PCs will match this exact specification. In all probability, the hardware will be configured differently. Therefore, the system’s hardware is the first thing you’ll have to take into account when making an image file.

Hardware requirements
You might assume that the two PCs must be identical in every way for an image file to work, but some variation is acceptable. Basically, to create an image file from one PC and use it to set up a second PC, the two PCs must use the same Hardware Abstraction Layer (HAL). The HAL is the Windows 2000 component that provides Windows with information, such as the type of processor the PC uses (Intel, RISC, etc.) and how many processors are installed in the PC. Generally speaking, if you always buy single processor workstations that use an Intel chipset, you probably won’t run into any problems with the HAL issue.

The next criterion your hardware must meet is that the two PCs must support Advanced Configuration and Power Interface (ACPI) in the same way. ACPI is an industry standard that defines the way a PC manages power. ACPI supports features such as Standby and On Now. Unfortunately, there’s no getting around this particular requirement. If you’re creating an image file based on a newer PC, however, and you’re planning on using that image file to configure a new PC, you will typically be okay on the ACPI requirement.

The final hardware requirement takes a little more caution on your part. The original computer and the clones that you create from the image file must all share the same type of mass storage device and controller. If all of your workstations have IDE hard drives and use an IDE CD-ROM drive, you won’t have too many problems. You may run into some issues if the hard drives are different sizes, especially if your configuration divides the hard drive into multiple partitions. Generally speaking, though, as long as the devices are the same basic type and the hard disk on the clone is at least as large as the hard disk on the master, you should be okay. You’ll have to be careful when it comes to computers that use SCSI devices, though. The SCSI controller types must match exactly from one computer to another.

Since the Sysprep tool only depends on the HAL, ACPI, and mass storage devices being compatible, you may be wondering what happens to the remainder of the hardware within the system. After you clone a PC based on an image file, the new PC will go through the process of detecting plug and play devices automatically. Because the new PC goes through the plug and play detection process, you don’t have to worry about the two PCs having different network cards, video cards, etc. Many of the drivers for such plug and play devices are automatically included in the image file so you don’t have to find all of your driver disks each time you set up a new PC.

Network requirements
Although the Sysprep tool is fairly lenient when it comes to hardware, you must adhere to a very strict set of rules regarding network configurations. Remember that when you attach a Windows 2000 Professional machine to a network, there are a number of things that must be unique. For example, the machine must have a unique computer name and a unique entry in Active Directory. If you were to attach the computer to a domain and then clone the computer, you’d have some major problems on your hands because the network configuration that’s supposed to be unique would be duplicated across multiple PCs.

To prevent the possibility of cloning undesirable settings, I recommend setting up the initial PC specifically for the purpose of cloning it, rather than trying to clone a PC that’s already been joined to your network. Once you’ve installed Windows on your computer, don’t join the computer to a domain until after you’ve made an image of it. Keep in mind that the idea is to avoid putting anything computer-specific onto the system. There’s nothing wrong, though, with installing a few network components to save some work later on. For example, you might consider setting up the system as a member of a workgroup. By doing so, you’ll make it easier to join a domain later on, since the network components will already be installed. Remember that setting up a PC to be a part of a workgroup requires a unique computer name. Just assign the machine a generic computer name.

Other issues
Although it may not sound like it so far, the idea behind building an image file in the first place is to make it easier to set up new computers. Sure, you may have to load a few device drivers and join the PC to a domain after you’ve set it up from an image file, but that’s about all you should have to do. The image file should transfer Windows and your applications to the new PC. Therefore, it’s important to set up the master PC exactly the way you need the user’s PCs to be configured.

This means you’ll want to install any applications that the users may be using onto the master PC before you build the image file. You’ll also want to install things like service packs, hot fixes, and antivirus software. Although antivirus definition files become outdated quickly, it’s not a bad idea to go ahead and install the latest virus definitions onto the master PC if you can get them without attaching to a domain. As you load applications and other software, be sure to double-check your software licenses to make sure you won’t be violating a license agreement by installing the software on additional PCs.

As you configure the master PC, I recommend also setting up the machine’s local security based on your organization’s needs. This may mean doing things like disabling the guest account or setting up a local group policy. I personally like to leave the administrator’s password blank when I create an image file and then fill in the password later. Once you’ve got your security settings configured the way you want them, you might consider running a system audit just to make sure that the system measures up to the security standards you normally use on your network.

The cleanup
Once you’ve got all of your applications loaded onto your master PC and it’s passed a security audit, it’s time to clean up your mess. Remember that during the process of configuring and auditing the master PC, some things have probably been put on the PC that you don’t want to duplicate. For example, you’ve probably got entries in your System log or in your Security log. While it may seem trivial to clear out the log files, remember that the log files are often used to troubleshoot problems. If you do find yourself troubleshooting a problem on one of the clone PCs, you don’t want to confuse yourself by having log entries that came from a different PC.

Preparing for duplication
Before you can build an image file, you must prepare the Sysprep utility. This process involves creating a new folder off of the system’s root directory and installing the Sysprep tool into it. To do so, select Programs | Accessories | Command Prompt from the Start menu. When the command prompt window opens, enter the following commands:

Insert your Windows 2000 Professional installation CD into your CD-ROM drive. Next, open My Computer, right-click on your CD-ROM drive, and select the Explore command from the resulting context menu. When you do, you’ll be able to browse the contents of the Windows 2000 Professional CD. Navigate to the \Support\Tools directory and double-click on the Deploy.cab file to open it. The Deploy.cab file contains a compressed copy of a variety of system tools. Copy the Setupcl.exe file and the Sysprep.exe file from the Deploy.cab file to the C:\Sysprep directory that you created earlier.

At this point, you can begin creating the image file. However, if you run the C:\Sysprep\Sysprep.exe file, you’ll see a message that states that some security options may be reset and that the machine will be rebooted when the process completes. As you might suspect after reading such a warning, there’s more to the process than meets the eye. Therefore, don’t attempt to run Sysprep until you’ve read part two.

In this Daily Drill Down, I explained that Windows 2000 offers a tool called Sysprep that you can use to simplify the task of setting up new computers. I explained some of the issues that you’ll have to take into consideration when using this utility, especially in the hardware, networking, and security areas. In part two, I’ll walk you through the process of duplicating a system, and I’ll also show you how to use an .inf file with the Sysprep utility.

Editor's Picks

Free Newsletters, In your Inbox