Back in August 1998, when Windows NT 5.0 Beta 2 was released, I noted the absence of a custom installation option, figuring that it's exclusion was simply an oversight for that one release. After all, all other Microsoft operating system releases, including NT 4.0, had provided a custom installation option. However, my hopes were soon dashed when Microsoft informed me that it had no plans to include a custom installation option for NT 5, which later became known as Windows 2000. I complained long and hard and was eventually somewhat successful: Microsoft added a custom installation option to the Setup procedure for Windows 2000 Server, but not Professional. Why not?
Microsoft's answer was somewhat unexpected, but it made some sense: They agreed to include custom installation of Server because server operating systems are installed so infrequently. But Windows 2000 Professional was designed for widespread corporate rollouts, so the company expected administrators to script unattended installations anyway. And an unattended installation script is an obvious way to perform a custom install of Windows 2000 Professional.
Unless you're an individual user, of course. Despite Microsoft's best intentions and my clear warnings, many "normal" users are going to walk into a local retailer, purchase a copy of Windows 2000 Professional, and install it on their home PCs. And since most of these users aren't experienced enough to perform a custom installation, I exposed the hidden way that you can remove optional components after installation in my Technology Showcase, Removing Windows Components after Installation in Windows 2000. But for many users, it would be nice to perform a true custom installation of Windows 2000 from the get-go. And such a thing is not only possible; it's actually pretty easy. But in typical fashion, it's also not very obvious, even though everything you need comes right on the Windows 2000 CDROM.
There are a couple of caveats, of course. I spent a weekend installing and reinstalling Windows 2000 in this manner, but there are some scenarios I didn't handle. These instructions assume that you'll be installing Windows 2000 as the only operating system, for example, so I don't deal with dual-booting issues. And some of the things I tried never worked, despite numerous attempts. I'll point out these pitfalls along the way.
Getting what you need
The first step is to get the tools you need, which are hidden on the Windows 2000 Professional CD-ROM. If you navigate to the /SUPPORT/TOOLS folder on the CD-ROM, you'll find a compressed file named DEPLOY.CAB. Extract the files contained in the CAB using a tool such as WinZip, and you'll find a number of useful files, including but not limited to:
- setupmgr.exe - The Windows 2000 Setup Manager Wizard, which is used to create an unattended installation file.
- unattend.doc - A Microsoft Word document containing information crucial to the creation of an unattended installation file (or "answer file").
- deptool.hlp - A help file for the Windows 2000 deployment tools, including the Setup Manager we'll be looking at in this showcase.
- readme.txt - Up-to-date information about the Windows 2000 deployment tools, including a few corrections to the unattend.doc file which may come in handy.
Now that you've extracted the files, it's time to create a bare bones unattended installation file, which will be used to perform a custom installation of Windows 2000.
Using Setup Manager
The Windows 2000 Setup Manager Wizard (setupmgr.exe) helps you create an unattended installation file, though you'll have to manually tweak the file it generates before it's of any use. Unattended installation files take two forms, a unattend.txt file that you can place in a Windows 2000 installation distribution folder or a winnt.sif file that can be used with a CD-ROM-based install. Since this showcase is based on a single-user customized install, we'll create a winnt.sif file. But filenames not withstanding, unattend.txt and winnt.sif files are identical; only the way you use them is different.
When you run the Setup Manager Wizard, you'll be asked whether you want to create a new answer file, create an answer file that duplicates the current computer's configuration, or modify an existing answer file. We are creating a new file. In the next step, you identify what the answer file will be used for. In this case, we will be performing a Windows 2000 unattended installation. Then you choose whether this will be for Windows 2000 Professional or Server. I've only tried the Professional version, so Server doesn't apply to this showcase.
The User Interaction choice is one of the most important. You will want to choose "fully automated" so that Windows 2000 Setup doesn't prompt you for any information during installation. For this to work, you need to supply all of the answers Setup needs in the answer file. And as I mentioned previously, this is where Setup Manager falls short somewhat, as we're going to need to hand-code a few changes after the Wizard is complete. In the next step, you must accept the Windows 2000 licensing agreement.
Then, the default name and, optionally, organization, you want to use are specified. After that, you will supply the name, or names, of computers that will use the answer file. In this showcase, I'm assuming that you're performing this operation on a single computer, so enter that name as required and click the Add button to add it to the list. After that, the local Administrator's password is entered. Note that the answer file is a plain text file, so the password you enter will be written to a file that will eventually find its way onto a floppy disk. There is absolutely no security in such a setup, of course, but then we're assuming a single system individual user here, so that's probably not an issue. You can also choose to have the Administrator account automatically logon when the computer first boots. I cannot even begin to understand why this is an option and I strongly recommend that you do not select this choice.
In the next section, you can configure the display settings, including color depth, screen resolution, and refresh rate. After that, the network settings are specified. And this is where I had some problems: For my small internal network, I hard-code IP addresses, the gateway address, and the DNS server addresses manually. In each of the unattended installations I performed, this information did not find its way onto the system for some reason. Whether this is because the system uses a PC card network card is a mystery. In any event, you can presumably setup this information here as you see fit. I chose custom setting, told the Wizard that I only have one network card, and then hard-coded the appropriate information in TCP/IP properties.
Then, you can choose whether the system will participate in a workgroup or domain. I have an Active Directory domain running at home, but I realize most users don't have this luxury, so we'll assume that the machine participates in a workgroup (or is a standalone PC, which requires a one-machine workgroup). For this example, I'll add the machine to a fictional workgroup called thurrott.
In the next step, you specify your time zone. In the answer file, the time zone is actually specified as an integer value, but the friendly Wizard interface allows you to choose a friendly name from a list; it will write the correct value to the file. In the next step, you can specify whether the system requires any additional settings to be automatically configured. If you're using a modem, you definitely want to choose Yes. Otherwise, you can safely choose No.
Assuming you chose Yes, the next step allows you to enter telephony configuration information, such as the area code and type of phone system that's in use at your location. Then, you can change your regional settings (not recommended), additional languages to install, and customize Internet Explorer settings, which is not required for most home users. You can then determine the default system folder used (\winnt by default) and whether any printers should be automatically installed. There are also options to configure applications that run each time a user logs on, and for creating an installation distribution folder (network users only; this showcase does not cover this option).
Finally, you are prompted to create the answer file, which defaults to unattend.txt. Change the name to winnt.sif and save it to your desktop or somewhere else you can find it easily. Your answer file and a batch file will be written to that location. Let's take a look!
Looking at the answer file
Right-click the winnt.sif file and choose Open With and then Notepad. It should resemble the following:
;SetupMgrTag \[Data\] AutoPartition=1 MsDosInitiated="0" UnattendedInstall="Yes" \[Unattended\] UnattendMode=FullUnattended OemSkipEula=Yes OemPreinstall=No TargetPath=\WINNT \[GuiUnattended\] AdminPassword=mypassword OEMSkipRegional=1 TimeZone=35 OemSkipWelcome=1 \[UserData\] FullName="Paul Thurrott" OrgName="Windows 2000 Magazine" ComputerName=laptop \[Display\] BitsPerPel=16 Xresolution=1024 YResolution=768 Vrefresh=85 \[Identification\] JoinWorkgroup=thurrott \[Networking\] InstallDefaultComponents=No \[NetAdapters\] Adapter1=params.Adapter1 \[params.Adapter1\] INFID=* \[NetClients\] MS_MSClient=params.MS_MSClient \[NetServices\] MS_SERVER=params.MS_SERVER \[NetProtocols\] MS_TCPIP=params.MS_TCPIP \[params.MS_TCPIP\] DNS=No UseDomainNameDevolution=No EnableLMHosts=Yes AdapterSections=params.MS_TCPIP.Adapter1 \[params.MS_TCPIP.Adapter1\] SpecificTo=Adapter1 DHCP=No IPAddress=192.168.0.7 SubnetMask=255.255.255.0 DefaultGateway=192.168.0.1 DNSServerSearchOrder=126.96.36.199,188.8.131.52 WINS=No NetBIOSOptions=0
An unattended installation works by copying the winnt.sif file to a floppy disk and then booting your system with the Windows 2000 CD-ROM. If the winnt.sif file is found, Setup will use its answers to perform the install. Otherwise, it launches a normal interactive installation. The problem, however, is that the answer file isn't complete: As given, you will be prompted a number of times during Setup. So we need to make a few changes. And of course, there are no customizing options in this answer file. Those changes will need to be made as well.
The key to this process is the unattend.doc file which you extracted from the DEPLOY.CAB file. This document explains the syntax of the answer file and all of the options you can use. I'll present a few of the obvious ones, including all of the changes I made to successfully install Windows 2000 from scratch on a formatted system.
Making the answer file truly unattended
First, we need to make a few additions to the \[Unattended\] section of the answer file. I added the following two parameters:
The Repartition parameter specifies whether all partitions on the first drive of the system should be deleted and reformatted. And the FileSystem parameter ensures that the drive is formatted as NTFS, not FAT32. Strictly speaking, the FileSystem parameter may not be required, as the Repartition parameter apparently ensures that NTFS is used. If you're not going to use a single partition for Windows 20000 (because you're dual booting, perhaps, or prefer to use multiple partitions for some reason), these options should not be specified; refer to unattend.doc for details.
Next, the ProductID parameter must be added to the \[UserData\] section. If this parameter isn't present, Setup will halt and prompt you for the Product ID (also known as a CD key). In a single machine setup, adding the product ID to the answer file shouldn't be a problem, but remember that this information is not encrypted, so you'll need to keep the file in a safe place. The ProductID parameter looks like this:
Of course, you should substitute a valid product ID in place of the string I use here as an example.
At this point, you have a fully functioning answer file that you can use to install Windows 2000 without any prompting from Setup. But that's not really the goal, is it? To create a custom installation of Windows 2000, you must add a \[Components\] section to the answer file and fill it with a parameter list so that the features you want are installed or not installed.
Adding custom install options
As detailed in the unattend.doc file, there are a number of components you can choose to install in Windows 2000 using an answer file. I added the following Components section to my own answer file:
\[Components\] accessopt=Off certsrv=Off certsrv_client=Off deskpaper=Off dialer=Off freecell=Off hyperterm=Off iisdbg=Off iis_common=On iis_doc=On iis_htmla=On iis_inetmgr=On iis_www=On minesweeper=Off mswordpad=Off netcis=On netoc=Off pinball=Off solitaire=Off
The goal was to remove the Accessibility applications, games, and various other utilities I never use, while adding the basic IIS Web features. My results were mixed, however. None of the games were installed, for example, but the Accessibility options were all installed.
For a complete list of the components you can install (or remove), please refer to the unattend.doc file.
Running the customized installation
To implement the customized installation, copy the winnt.sif file to a floppy disk and boot the system with the Windows 2000 CD-ROM. If everything goes according to plan, your answer file will enable to you complete a hands-off installation that enables only those features you want installed. On a PII-266 laptop with 160 MB of RAM, this took about an hour and fifteen minutes, but I didn't need to interact with the system at all during the installation. I suspect that more modern hardware would significantly cut down on the time required to setup the system.
Overall, I was pretty happy with the results, and I'm working on some more sophisticated ways to custom install Windows 2000 automatically as I need to constantly rebuild my desktop and mobile systems. My next attempt will use a network-based installation distribution folder so that I can slipstream service packs and other fixes into the base installation of the system. And I'll continue to work at refining my answer file so that my base install is more closely aligned with my needs.
I'm interested in your experiences with customized unattended installation of Windows 2000. But remember to backup any important data before you try something like this: The steps I've outline here will wipe out the primary partition on your system. If you've got any tips or tricks that would improve this showcase (for example, any notes about dual booting and unattended installs), please contact me and let me know.