When you simply boot a system from the CD-ROM, then you’re not aware of the name of the program that starts off the setup process. But you can also initiate a Windows Server 2003 setup from the command line with one of two commands: winnt32.exe if you’re starting the setup from
a computer that’s already running Windows NT or later, or winnt.exe for a system running DOS
or Windows 3.x or 9x.
Note Someone always e-mails me to correct me, saying that you use winnt32.exe for Windows 9x. Not me. I boot 9x systems to Safe Mode Command Prompt, use the LOCK command to lock the C: drive, and install. There you need winnt.exe.
The command-line parameters of these programs tell the Setup program where your source instal- lation files are, where you want to install Server, where your answer file is located, and other information needed to prepare for the setup. A command-line parameter can also be used to copy an additional folder to your setup source so that those files will be available during the installation. This is handy when you have OEM drivers for the hardware you want to install during the setup rather than waiting until afterward.
Before you start using command-line parameters, it is important to really understand them. They can have a very profound impact on the installation process, so let’s go over the WINNT32 options: /checkupgradeonly Whenever Setup begins, it checks to see if an upgrade is possible. Setup will not attempt to actually run the install.
/cmd:command This option will launch the given command line before the setup process has completed, which will allow you to perform some additional customization or launch other programs.
/cmdcons If you have a failed installation on your system, this option will add a Recovery Console item to your boot.ini operating system selection menu.
/copydir:folder When you’re doing automated installs for a large number of machines, this may be one of the most useful options in your arsenal. How many times have you been stopped in the middle of an installation because your network card drivers are, well, on the network? You resort to copying files to a floppy, spend 10 minutes trying to find one, format it, copy files, and hike them back to your server. What a bother. The /copydir option can really help you out here. It will copy the specified folder to your installation directory during setup—while you’re still connected to your network.
/copysource:folder Similar to the /copydir option, the /copysource option copies a specified folder to your installation directory. The major difference between the two is that the /copysource directory is deleted after setup is complete.
/debug[level][:filename] You can tell Setup to log debugging information to a given file based on the following criteria. Level 0 logs severe errors only, 1 adds regular errors, 2 includes warnings, 3 adds all informational messages, and 4 incorporates detailed information about the setup for complete debugging purposes. For example, you could use /debug3:setuplog.txt.
PERFORMING UNATTENDED INSTALLS: AN OVERVIEW 123
/duprepare:path containing CAB files with updates This is not a command that you’d run at Setup. Instead, you use this to prepare a directory that contains updates so that when you do run Setup on a system, you can use the /dushare option to point Setup to these updates. This is a pretty new process in the Microsoft OS world and the instructions on how to do this change regularly, but the most current details are at www.download.windowsupdate.com/msdownload/update/ v3/static/DUProcedure/Dynamic%20Update.htm. You don’t go to the regular windowsupdate
.microsoft.com location to download fixes en masse; instead, you go to windowsupdate.microsoft .com/catalog.
/dushare:path to share created by duprepare Once WINNT32 /duprepare has reconfigured the patch and update files that you downloaded from Windows Update, you can set up a new computer and simultaneously apply the latest patches with the /dushare: option.
/m:folder This option can be dangerous. When the setup process begins to copy files, the /m option tells it to look in the specified folder first. If that folder contains files to be used in setup, those files be will used. If the files are not present, they will be retrieved from the regular instal- lation source. This can be helpful if a hotfix or alternative version of a file that you choose to use for every install (rather than the default version on the CD) is available. Instead of running your install and then running an update or replacing files, you can use /m and perform these tasks in one swift step.
/makelocalsource Have you ever had problems reconnecting to your installation source after you’ve rebooted and started the setup? This could be due to things like Setup not recognizing your CD-ROM or network card. This option tells Setup to copy the entire source to your hard drive so that you can guarantee it will be available later.
/noreboot There may be times when you want to launch the first stage of Setup, get your machine ready for the installation, but not reboot quite yet. This option will bypass the screen at the end of the first setup wizard and return you to your existing operating system without a reboot. When you do reboot, though, Setup will continue.
/s:sourcepath This seems like a redundant switch. You’ve already found your source path if you’ve gotten as far as launching the setup. Setup even knows where it’s coming from. This param- eter does help identify where your source is—the I386 directory—but it also does something
better. You can specify multiple source paths and have Setup copy files from each simultaneously. This can really save you time if you have a slow CD and a slow network. Be careful, though; the first source path identified must be available or Setup will fail.
/syspart:drive Another very powerful option here when you’re considering mass deployments is the /syspart parameter. This will start your setup to the specified drive and mark that drive as active. Once Setup is complete, you can physically take that hard drive out of the system, place it in a new system, and boot right into Setup. You must use the /tempdrive parameter with /syspart.
/tempdrive:drive Setup will use the specified tempdrive to place temporary setup files. If you have space concerns with drives or merely a preference on where you want temporary files to go, use this parameter.
124 CHAPTER 5 SETTING UP AND ROLLING OUT WINDOWS SERVER 2003
/unattend The /unattend option will do an automated, no-input-required upgrade of your pre- vious operating system. All configurations and settings of the old operating system will be used for the upgrade.
/unattend[num]:answer_file This launches one of the most powerful features of unattended installations: the answer file. The answer file is a text file containing any or all answers to be used throughout the entire setup process. I’ll talk about building the answer file in the next section. If your current operating system is Windows 2000, you can also specify a time delay for the reboot, determined by [num].
/udf:id[,udf_file] One of the problems with automated installations is that you can’t fully auto- mate an install unless you provide a name for the server, and all servers—all machines for that matter— on your network must have a unique name. This requires that you either enter the name during the setup or use an answer file on all machines, giving them the same name. Neither of those are viable options. The /udf parameter allows you to specify unique information about each instal- lation based on the file specified in the UDF file—uniqueness database file. Here’s how it works. In the UDF file, there is a listing of names and a section matching each name with computer- specific information. Usually the computer-specific information will be just the computer name, but anything you put in this file will override the same entry in the answer file. Take a look at a sample UDF file named unattend.udf:
;SetupMgrTag [UniqueIds] BS01=UserData BS02=UserData BS03=UserData BS04=UserData BS05=UserData [BS01:UserData] ComputerName=BS01 [BS02:UserData] ComputerName=BS02 [BS03:UserData] ComputerName=BS03 [BS04:UserData] ComputerName=BS04 [BS05:UserData] ComputerName=BS05
I have five specified, unique computers defined—BS01 through BS05. If I’m sitting down to install a machine for BS03, I would send the /udf:BS03,unattend.udf parameter. The Setup program will look in the UDF file and have any entries under the BS03 section override those in the standard answer file. So if the ComputerName entry in the answer file is BSxx, Setup will substitute BS03 in its place for my installation.
Those are all of the possible command-line parameters that you can feed the WINNT32 program. To better see how they work, let’s try a few samples of running WINNT32 from the CD located in F:.
PERFORMING UNATTENDED INSTALLS: AN OVERVIEW 125
We are installing to a server that is very specific about using OEM drivers for the network card. If we start the setup and reboot, the default drivers with Windows Server 2003 won’t get us back online. We’ll use the /copysource option to copy down our drivers from the network folder of
Z:\NIC\OEM. Just to be on the safe side, we also want to use a /makelocalsource option so we have all
files available for use. We’ll launch the following command:
F:\I386\winnt32 /copysource:z:\nic\oem /makelocalsource
During the first phase of Setup, the entire z:\nic\oem directory will be copied to the hard drive
to be used during the installation. Once completed, the directory will be removed to free up our space again. We will also get a complete copy of the I386 directory copied to our local installation source.
Between the two, we should have no problems with the installation not being able to find files. Now, we want to launch a setup using an answer file named C:\w2k\setup\unattend.txt and a
uniqueness database file named C:\w2k\setup\unattend.udf. To keep parity with the earlier scenario,
we’ll install this machine with the BS03 ID. In this case, we run this command:
F:\I386\winnt32
/unattend:c:\w2k\setup\unattend.txt
/udf:BS03,c:\w2k\setup\unattend.udf
WINNT supports a subset of those options—/s, /t, /u, and /udf—as well as these