Unattended Installs with Windows 2000 Professional

Answer files for unattended installations in Win2K are much more powerful and easier to create than they were in Windows NT 4.0.

Mark Minasi

May 10, 2000

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


They're much easier than they were with NT 4.0

I regularly rebuild my Windows 2000 Professional (Win2K Pro) desktop—a job that takes hours. But I'm always looking for a way to make this task easier. I once did some digging to learn how to automate the process as much as possible, and that research led to a series of articles about unattended Windows NT 4.0 installs. (For a list of those articles, see "Related Articles in Previous Issues," page 176.) Later, I reported on a Windows 2000 (Win2K) feature, Remote Installation Services (RIS), that greatly simplifies installations. But RIS requires you to have Active Directory (AD) set up. What can you do if you want to simplify installs but aren't yet using AD? A file named winnt.sif and Win2K Pro's new Setup Manager, WinINSTALL LE, can ease installations.

Winnt.sif
Like NT 4.0, Win2K Pro lets you create an ASCII text file called an answer file that contains the answers to the questions that the Setup program asks. But Win2K Pro's file picks up where the NT 4.0 file leaves off.

One new feature is the winnt.sif file. (Don't confuse this file with NT's winnt.sif file, which has a different function.) To feed an unattended-installation script to NT's Setup program, you must set up NT using either the Winnt or Winnt32 program. Both programs spend a lot of time shuffling files back and forth, greatly extending an unattended install's duration. Win2K lets you script an install simply by booting from the Win2K Pro CD-ROM. When you boot from the CD-ROM, Win2K's Setup program looks in the A drive for a 3.5" disk, which Setup uses as its answer file. You'll need to create winnt.sif and save it on a 3.5" disk before you run Setup. The answer file doesn't need to be complex—Listing 1, page 176, shows a file that worked for me. Because many of the lines will be familiar to you if you've worked with an NT 4.0 install script, I'll concentrate on explaining the new lines.

In my experience, these unattended scripting files aren't case sensitive except when they include passwords, which are case sensitive. The [Data] section is boilerplate code that basically says that because this install is unattended, Setup shouldn't bother you with questions. In the [Unattended] section, the new UnattendMode command also says that Setup shouldn't bother you with questions. Repartition=Yes tells Win2K Pro Setup to wipe any partitions off the computer's hard disk. Setup then automatically creates one large NTFS partition out of the space on the disk and puts Win2K Pro on that partition. This convenient function saves a couple of steps that unattended installs under NT 4.0 often required.

The [GuiUnattended] section lets you type in AdminPassword=* if you want a blank Administrator password (NT 4.0 uses an OEMBlankAdmin command for that purpose). Alternatively, you can specify the password on that line, as in AdminPassword=swordfish. OEMSkipRegional=1 tells Setup not to prompt you for regional settings. TimeZone=35 sets my workstation to the Eastern time zone—a big improvement over NT 4.0, which requires you to type the time zone's entire descriptive name and refuses to work if you don't get it exactly right. The Setup Manager, which I discuss later, inserts the numeric code for you.

The [UserData] section is the same as under NT 4.0, although sadly you can no longer use a product ID that consists of all 1s. The new and welcome [FavoritesEx], [Branding], [URL], and [Proxy] sections let you configure how Microsoft Internet Explorer (IE) 5.0 sets up. The [FavoritesEx] section preloads my browser with a bookmark for my home page. The [Branding] section says to set up IE unattended, and the [URL] section sets up IE 5.0 so that it doesn't default to msn.com at startup. The [Proxy] section lets you configure a proxy server.

The [Identification] section is the same as it was in NT 4.0. In Listing 1, this section tells Setup to create a machine account for a new computer in the acme.com Win2K domain, a process that requires an Administrator name and password. (This section works fine for creating accounts in NT 4.0 domains as well.) You could use the name and password of a considerably less powerful account, because all the Administrator account needs to do is to create and delete machine accounts.

Finally, in the [Networking] section, you'll love seeing how easily you can set up an unattended installation of networking code. Win2K's Plug and Play (PnP) greatly simplifies unattended setup compared with NT 4.0.

Setup Manager
Putting together this answer file was easy. Win2K Pro's vastly improved Setup Manager did most of the heavy lifting. You can find Setup Manager on your Win2K Pro CD-ROM—look in the Support folder's Tools subfolder. Double-click the deploy.cab file, and you'll find seven files. Copy setupmgr.exe (and the other files, if you'd like) to a folder on the hard disk, and run setupmgr.exe. A wizardlike interface steps you through creating an unattended installation script and leaves NT 4.0's Setup Manager in the dust.

I'm not going to walk you through Win2K's Setup Manager in detail, but I do want to warn you about things it asks that might not have obvious answers. At one point, Setup Manager offers five levels of user interaction. You want to use the Fully automated level. Later, Setup Manager lets you name your computers; you can either specify a name or tell the script that Setup should generate names automatically. What's interesting about this feature is that you can specify more than one computer. Doing so causes Setup Manager to create a uniqueness database file (UDF), another improvement over NT 4.0's requirement that you build a UDF from scratch with only the help that you can glean from a small amount of cryptic documentation. Finally, Setup Manager asks whether you want to create or modify a distribution folder. A distribution folder contains the i386 files as well as any $OEM$ folders—in other words, it's a network share that you can use to start an unattended install without having to carry an NT CD-ROM to the target PC. To create a script file without creating a distribution folder, choose No, the answer file will be used to install from a CD, and Setup Manager will create only the answer file.

You'll have to edit the file a bit, though. For some reason, Setup Manager doesn't prompt you to create the [UserData] ProductID line. Nor does it offer the [Unattended] Repartition=Yes line, so you'll have to add that as well if you want to repartition. Additionally, you might want to add a section named [Components], which lets you restrict Setup from installing certain applications. For example, adding the lines

[Components]solitaire=Offminesweeper=Offmplay=Off

produces a system without Solitaire, Minesweeper, or MediaPlayer. Unattend.doc, a file in deploy.cab, lists all the component names.

Related Articles in Previous Issues

You can obtain the following articles from Windows 2000 Magazine's Web site at http://www.win2000mag.com/articles.MARK MINASIInside Out, "Using Win2K's Remote Installation Service," September 1999, InstantDoc ID 7109Inside Out, "Unattended SCSI Adapter Driver Installations," November 1998, InstantDoc ID 3951Inside Out, "Automatically Install Display Drivers," October 1998, InstantDoc ID 3863Inside Out, "Unattended Install Tricks," September 1998, InstantDoc ID 3773Inside Out, "Advanced Unattended Installs," August 1998, InstantDoc ID 3685

WinINSTALL LE
Under NT 4.0, you can use Sysdiff files to enhance a basic installation by adding applications or settings. Sysdiff lets you edit a basic system configuration—by adding applications, for instance—and use the new file to reproduce those changes on other machines. In Win2K Pro, a better tool, called WinINSTALL LE, replaces Sysdiff. You'll find WinINSTALL LE on the Win2K Pro CD-ROM in valueaddmgmt3rdpartywinstle. Double-click the swiadmle.msi file to install WinINSTALL LE, which can create Windows Installer—formerly called Microsoft Installer (MSI)—files. You can then use the answer file to tell Setup to apply the .msi files after installing Win2K Pro.

A Timesaver
Microsoft still has room for improvement in Win2K's rollout and deployment tools, as I explain in En Garde, "Unattended Installs in a Perfect World," page 61. But with Win2K Pro's enhanced answer file, improved Setup Manager, and WinINSTALL LE, I can do a scripted rebuild of my workstation in no time.

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