• No results found

140 C HAPTER 5 SETTING UP AND ROLLING OUT WINDOWS SERVER

Getting the Script Ready to Try

140 C HAPTER 5 SETTING UP AND ROLLING OUT WINDOWS SERVER

service pack will only take the name of the directory aboveI386 as an input, you really must store

the data from the CD’s I386 folder in a folder also named I386. This isn’t a great hardship—most

distribution shares I’ve ever seen are named I386—but now there’s a reason that you really have to call

the directory I386.

Tip Now that you’ve seen how to automatically install a service pack, you’re probably wondering how to automatically

add the latest hotfixes. I’ll show you how to do that in the upcoming section “Tell Setup to Run Commands with cmdlines.txt.”

$OEM$: More I386 Power

Look back at my example script and you’ll see, in the [Unattended] section, a command OEM- Preinstall=No. Let’s change that No to Yes and unlock a bunch of convenient unattended setup features:

◆ You can tell Setup to create directories and files on the newly installed machine. ◆ You can tell Setup to run any number of commands at the end of setup—for example,

commands to tell Setup to install other applications.

◆ You can supply Setup with newer device drivers than the ones that ship with Server 2003, or device drivers for hardware that didn’t even exist when Server 2003 shipped.

◆ You can specify that you want to install a particular Hardware Abstraction Layer (HAL). You wouldn’t do this very often (so I’m not going to cover the topic any further), but once in a while you’ll try to build a setup script for a system that needs a custom HAL, and this is the only way to tell Setup to use it while unattended.

Here’s how to use the power of $OEM$. Inside an I386 directory, create a directory named $OEM$.

For example, suppose you’d copied the I386 directory to the E: drive and then perhaps slipstreamed

a service pack onto it. Before starting to do installs from that E:\I386 directory, create a directory

named E:\I386\$OEM$. We’ll do our work in the following sections in that directory. Setup Bitmaps and Logos

While the Setup program runs on a user’s machine, you might want to include instructions or infor- mation on the screen. You can do that with the [OEM_Ads] section. Create a section in your script with a logo= and a background= command, like so:

[OEM_Ads] logo=ourlogo.bmp background=backgrnd.bmp

Place the files ourlogo.bmp and backgrnd.bmp in the \I386\$OEM$ directory. They must be simple

Windows-type bitmap files—you can’t use GIF or JPEG files. The background file will display as the background, centered on the Setup screen. Don’t use a bitmap larger than 640×480, as that’s the resolution that Setup runs in.

And by the way, here’s an important tip: Try out the bitmap and logo before using it for a user’s system install. Setup puts a couple of big dialog boxes up that obscure most of the background, so if you actually want to pass along some information, then you’ll have to be careful about where you place the info on the bitmap or logo; otherwise, the information won’t be readable.

PERFORMING UNATTENDED INSTALLS: AN OVERVIEW 141

Create Directories and Copy Files

If you create a directory inside $OEM$ with a one-letter name, like I386\$OEM$\E or I386\$OEM$\D, then

Setup will copy any file (or directory) in that directory to the drive letter of the same name on the newly installed computer. For example, suppose I want my computers to all have a directory on C: called Data, which will contain a file named basic.txt. Let’s assume that I’ve got the I386 distribution

share on a server, on its D: drive, so I’ve got the setup files in D:\I386. To ensure that every new system

created from this share has a directory named C:\Data and containing the basic.txt file, all I need

do is this:

◆ Create a directory named D:\I386\$OEM$\C.

◆ Create a directory inside that directory named Data -D:\I386\$OEM$\C\Data.

◆ Place the basic.txt file inside the D:\I386\$OEM$\C\Data directory.

$OEM$ also has a few “magic” directory names that you can exploit to place files into the system

folders. First, there’s the $$ directory. Anything in I386\$OEM$\$$ goes to winnt. What’s the value

of that? Well, when you’re writing an installation script, you might not know beforehand which drive

winnt will go on. Rather than having to create a directory named I386\$OEM$\C\winnt and then acci-

dentally try to use that to put files in winnt on a system that puts its operating system on the D: drive,

putting files in I386\$OEM$\$$ will ensure that those files will end up in winnt on the drive that

contains the operating system.

So, for example, if you liked the idea of including support information on your system, then recall that you store the support and branding information in a file named oeminfo.ini, which must sit in \winnt\system32. You could create an oeminfo.ini file and then place it in a distribution share at I386\$OEM$\$$\system32, and the file would then automatically get copied to the system32 directory

of any newly installed systems. You’d be ensuring that every new system gets the support information without requiring any extra work on your part.

Including Updated Drivers

Every version of Server includes a pretty large collection of drivers in its initial offering. But from the minute they ship a version of server, boatloads of new hardware appear, so as a version of Server gets older, it’ll be more and more likely that either you have a piece of hardware that didn’t exist at the time of that version’s birth (and therefore that version lacks a driver for it), or the hardware’s manufacturer has created a newer and better driver—and Server 2003 is no exception. You can automate the process of telling Server 2003 to use a new or updated driver, using the OEMPnPDrivers command.

Create the directories for new or updated drivers in $OEM$\$1\, then specify them in OEMPnP-

DriversPath. For example, suppose I’ve got some new video and audio drivers, and I place the new video drivers into a directory named I386\$OEM$\$1\newvid. Then I put the new audio drivers in I386\$OEM$\$1\newaud. I can then tell Setup to look for them by adding this line to the [Unattended]

section of my setup script:

OEMPnPDriversPath="newvid; newaud"

Notice that we describe directories by their path below $OEM$\$1. Don’t include I386\$OEM$\$1 in

Outline

Related documents