Designing Unattended NT Installations

Discover how Setup Manager lets you write a script not only to instruct Windows NT how to perform an installation but to customize the installation for each user.

Christa Anderson

February 28, 1997

11 Min Read
ITPro Today logo in a gray background | ITPro Today

Look Ma, no hands!

If you're going to install Windows NT on more than a few machines, you've gota lot of work ahead of you. Admittedly, NT is easier to install than some otheroperating systems. Still, the complete installation process represents time youcould spend elsewhere. Even with the fast CD-ROMs on the market and theconvenience of floppy-less or network installations, overseeing an installationtakes time, and time is valuable.

Now NT 4.0 lets you write a script not only to instruct NT how to perform aninstallation but to customize the installation for each user. Although NT 3.51supported answer files, which let you run installations from scripts, answerfiles weren't a perfect solution because you had to create a new answer file forevery change in the installation (such as the user's name). NT 4.0 adds a way tocustomize the answer files with uniqueness database files (UDFs), which apply tothe graphical portion of NT's setup. You can create an answer file for aparticular hardware platform and then tack a UDF onto the answer file tocustomize the installation for particular users.

NT supports two methods of unattended installations: Setup Manager and, forserver-driven installations, Systems Management Server (SMS). This article willdescribe Setup Manager.

General and Specific Scripts
Answer files automate the entire installation process, supplying parametersfor all aspects of your installation, from the type of network card to thecolors on your desktop. UDFs apply to only the graphical portion of setup, whichcontains user preferences and the machine's role in the network. I'll explainexactly how answer files and UDFs interlock, but the rule of thumb is that if aparameter value exists in both the answer file and the UDF, the value in the UDFcontrols. Otherwise, the value in the answer file controls. In other words,because answer files apply to both the text-based and the graphical portions ofsetup, you can create a UDF that applies to only certain portions of theGUI-based setup and let the values in the answer file control the rest of thetime.

Both answer files and UDFs are combinations of sections, keys, and valuesthat resemble Windows 3.x .ini files. Listing 1 shows a sample installationanswer file. In Callout A in Listing 1, [Unattended] is the name of the section,the entries such as NtUpgrade and TargetPath are keys, and the words noor manual are values. Just as you can't specify options during aninstallation until Setup asks for them, you must put keys and their values inthe proper section for them to take effect.

The sample installation answer file in Listing 1 resides in the i386directory of your NT Server or NT Workstation installation (unattend.txt). Theanswer file contains the following sections:

[Unattended]: information about how you want Setup Manager to identifyhardware and install the hardware drivers and whether the installation is new oran upgrade

[UserData]: fields for the name of the user, the computer, and theorganization

[GuiUnattended]: information for the time zone settings

[Display]: the display settings, including whether to configure theminteractively

[Network]: setting to install NT as network-aware

[ProtocolsSection]: TCP/IP by default, but you can choose other protocols

[TCParameters]: Dynamic Host Configuration Protocol (DHCP) by default

Creating an Answer File
Although you can edit unattend.txt in your favorite text editor, thesimplest way to create an answer file is to use Setup Manager. You can findSetup Manager within the supportdeptools subdirectory of your NT Workstation(not Server) installation. The exact location depends on your NT platform: Intelusers will find the Setup Manager in the i386 subdirectory of deptools. Or theMicrosoft Windows NT Server Resource Kit for NT 4.0 has a Server versionof setupmgr.exe that includes some options not in the NT Workstation SetupManager. The two tools are similar in function--the one in the resource kit justrearranges a few options and has some extras. (Before you configure aninstallation script with either version of the Setup Manager, run some manualinstallations to get a feel for the process.)

When you open the Setup Manager, you see the dialog box shown in Screen 1.Simply enter the identification information, then click the General Setupbutton.

As you can see in Screen 2, the General Setup Options are more complicated.(Note that the names on the tabs aren't exactly the same as the section names inthe text files.) Complete this dialog box and its tabs according to yourpreferences.

The General tab contains the settings that instruct NT Setup when to justdetect the hardware on the machine, as it does during a supervised installation;when to upgrade the current installation (remember that you can't upgrade aWindows 95 installation to NT); and when and how to run certain programs duringinstallation. If you want to fully automate the installation, be sure to leavethe Confirm Hardware check box blank.

The Computer Role settings define whether this NT machine will be a serveror workstation. Type the domain or workgroup name exactly--correctidentification of the domain or workgroup is crucial in an NT installation. TheComputer Role tab has no drop-down menus for you to choose from.

The System Directory tab asks for the name of the NT installationdirectory. If you keep the default, an asterisk will mark this entry in the textversion of the answer file. If you are upgrading, be sure to supply the propername of the directory; for unattended installations, choose either the defaultlocation or Define a location now. If you choose Define a location now, theinstallation will wait for the user to pick a destination directory.

The Display Settings tab corresponds closely with the [Display] section inthe text file. Although the point of an unattended installation is to avoidbabysitting the process, you may want to select the check box for configuringthe graphics settings as Logon. This way, you avoid installing settings that themonitor or the video card can't handle. If you choose the simplest options andset up the display for 640*480 and 16 colors, you should be all right. If you'renot sure what to enter in this dialog box, type 0 in each space or leave thespace blank. Then NT Setup will install the default settings (640*480, 60Hzrefresh rate, and 256 colors), as long as the hardware supports that mode.

The only issue to consider on the Time Zone tab is the destination of theinstallation. If you perform the installation in one time zone for a user inanother zone, use the destination time zone. You can easily modify the time zonelater.

When you've made your choices, save the answer file to a directory otherthan the default, because you may not think to look for answer files in thei386 subdirectory of deptools. If you open the file in a text editor, you'llfind the entries relating to each of these options in the sections shown inTable 1. Now let's look at the other two buttons shown in Screen 1: Networkingand Advanced.

Networking
Screen 3 shows the Networking Options dialog box. Select Attended NetworkInstallation to supervise the installation of networking. If you attend thenetwork installation, you don't have to configure settings on the Adapters tab.If you check Auto Detect Adapter(s), you can choose whether you want NT Setup tofind and install your network adapter cards, install the cards with your help,or just find the network adapter cards and let you install them. Select theInstall Modem check box if you want to configure a modem (and then complete thesettings on the Modem tab).

The Adapters, Protocols, and Services tabs let you define sections forinstalling these items. From the Services tab, shown in Screen 4, you canconfigure only network services: Simple Network Management Protocol (SNMP),Remote Access Service (RAS), and Client Services for NetWare. You can'tconfigure non-networking services here.

Remember the names you give the sections that describe adapters, protocols,and services. You must copy them exactly if you create a UDF to override somesettings in the answer file. To add a service, adapter, or protocol to the list,select the appropriate tab and click Add. For example, to install RAS, selectthe Services tab, and click Add to add the section. Then select the new sectionname and click the Add button below the List of Services list box to choose theRAS service. (The NT Workstation Setup Manager does not have a default name forthe Protocols, Services, or Adapters sections, but Microsoft Windows NTServer Resource Kit does. If you're using the resource kit, consider keepingthe default section names so that you can remember them more easily.)

To add a section describing a protocol's parameters, click Parameters.(Even protocols such as NetBEUI that don't take any parameters must have aParameters section in the answer file, but the section will be blank.)

Use the Modem tab to install a modem for use with NT. Be careful to selectthe correct communications port to use with the modem--you don't want to selectthe communications port a serial mouse uses. By selecting Modem Parameters, youadd a Modem Parameters section to the answer file. If you don't configure anysettings in the Modem Parameters section, NT Setup will use the defaultsettings. The settings defined in the Networking Options part of the SetupManager are either in the Network section of the answer file or in user-definedsections.

Advanced Settings
Clicking the Advanced button, shown in Screen 1, brings you to the dialogbox shown in Screen 5. Use this dialog box to add the final touches to the NTinstallation: input device drivers, file system, mass storage devices, and otheroptions that you set in text-mode setup. You don't have to configure many ofthese options for most installations. If you don't adjust the values on thesetabs, Setup Manager will use the defaults (autodetection, in the case of thehardware). Adjust them only if necessary. Setup restricts these settings to yourinstallation answer files because they're all set in text mode.

Creating a UDF
UDFs are similar to answer files, but they have an additional section,UniqueIds, and no sections that apply to only text mode. UniqueIdscontains the identifiers for each unique installation you specify in the UDF.For example, you use an answer file called wkstation.txt to create domainworkstations. Workstations don't have identical installations, so you create aUDF for the graphical settings unique to each installation type, such as thedomain name, display type, protocols to install, and the like. This UDF cancontain the specifics of more than one type of installation, but a certain textstring, a unique ID, identifies each set of specifics. In other words, you don'tneed a separate UDF for each unique installation. You create a UDF just as youcreate an answer file, except you must add the UniqueIds section by hand in atext editor; Setup Manager doesn't include a tab to create these identifiers.

The unique IDs are the keys in the UniqueIds section; the values of thosekeys are the sections in the UDF that replace the answer file values for thoseidentified installations. Therefore, the values in the following UniqueIdssection

[UniqueIds]erpent = UserData,GuiUnattended
froggy = UserData,Network
turtle = UserData,Modem

mean that the UDF includes three specific installation settings, serpent,froggy, and turtle (this company organizes wildlife preserves). Allthree settings will use the information in the answer file wkstation.txt, butsections of the same respective names in the UDF will replace the UserData andGuiUnattended sections in serpent; the UserData and Network sections infroggy; and the User-Data and Modem sections in turtle.

Be careful to name the sections in the UDF identically to the sectionsspecified in the answer file. If the two sections don't have the same name, theyconflict, and the UDF's parameters won't replace the answer file's parameters.

When used with answer files, UDFs usually have precedence, as theseexamples illustrate:

  • If a key has a value in the answer file but doesn't appear in the UDF, thevalue in the answer file controls.

  • If a key has a value in both the UDF and the answer file, the value in theUDF controls.

  • If a key has a value in the answer file and appears but has no value in theUDF, the default value for the key in the UDF controls (i.e., the answer filedoes not control). When there is no default, the installation will prompt theuser for the information.

  • If a section or key appears in the UDF but not in the answer file, Setupcreates that section in the answer file.

You cannot define all settings (most noticeably for hardware) in the UDF,but you must include all settings in the answer file. If a section appears inthe UniqueIds section of the answer file but does not exist in the UDF, Setupwill prompt the user for a floppy containing the UDF.

UDFs can apply only to the options set during graphical mode setup, nottext setup, so applying UDF values to the following sections won't affect theinstallation:

[Unattended]
[OEMBootFiles]
[MassStorageDrivers]
[KeyboardDrivers]
[PointingDeviceDrivers]
[DetectedMassStorage]

Using the Installation Files You've Created

Once you create the installation files for unattended installations, you putthem into play with the winnt or winnt32 command. To specify an answer fileonly, use the following syntax:

winnt32 /u:

where is the name and path of the answer file youcreated. To also include a UDF in the installation, type the winnt32 command:

winnt32 /u: /udf:

where is the name and path of the UDF. Ifyou don't specify a path, Setup prompts you for a floppy with a UDF named$unique$.udf on it. If you select Cancel when you're prompted for the UDF, Setupuses the values in the answer file.

No-Fuss Installations
NT 4.0 makes unattended installations even easier than they were in NT 3.51by letting you vary the setting for graphical-mode setup. For systemadministrators with lots to do and not enough time, these enhanced installationtools can be a lifesaver.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like