Windows XP Unattended Installation

Automate your OS installation. – Brian Berryman

SUMMARY: Look Ma, no hands!!

If you’re one of those people who for whatever reason finds themselves reinstalling Windows XP on your machine frequently, this might be something worth trying.

Wouldn’t it be nice to pop your Windows XP CD in, hit the space bar at the “Boot from CD” prompt, walk away and come back an hour later to a nice fresh install?

Unattended installs of Windows is nothing new, installations like this or remotely across a network save tons of hours in the business sector, by freeing up time spent in front of the console hitting the “Next”
button repeatedly. If you don’t have to babysit your install, why do it? I can think of many other things I’d rather spend that half hour to forty-five minutes doing.

I’ve been enrolled in classes at a local college for a while now, and recently we went through Microsoft’s 2272B Course (Implementing and Supporting MS Windows XP Professional).

This article outlines the same procedure for creating an unattended install disk covered in that course.

After covering this in class, myself and another student got adventurous, and did some searching on our own. We both independently found the same information (same site, too) that allowed
us to expand much further on the procedure outlined here.

For today, we’ll just cover the basics however. In a separate article soon, we’ll get into more advanced techniques. What can be done unattended is quite amazing.

Required:

  • Microsoft Windows XP Pro or Home CD
  • One floppy disk
  • Willingness to spend a half hour or so now, to save hours of time later

Note: I’ve used the conventions that your current install is located at “C:”, and your optical drive is “D:”. Change the drive letters used here as applicable.

Creating the Unattended files

The idea behind what we’re doing here is, we’ll create what’s called an answer file. This file contains the information you would normally enter during the graphical based portion of the actual Windows XP
installation. Changing or adding to these settings also allows for automated installs on different computers. They don’t have to be of identical configuration, but the closer they are the easier things go.

Once we get into the advanced techniques in the next article, we’ll see that with a bit of work, they don’t even have to be close. The same disks could be used to automate installation on an
AMD machine, and then get put right into an Intel based system.

A single floppy doesn’t have enough space to be this versatile though, so for now, we’re limited to a single system, or close to identical ones.

Ready? Here we go!

Start out by putting your Windows XP CD in your optical drive. Wait for the “Welcome” window to open and hit “Exit” when it does.

Double-click “My Computer”, and then double-click your hard drive (C:). Create a new folder here at the root of C: named “Deploy”.

Next, click “Start”, then “Run”. Type the following into the “Open” box: D:supporttoolsdeploy.cab

Extract

Click “OK”

Extract2

Extract these files to “C:Deploy”

Deploy

In reality, the only file of the lot we’ll need is the Setupmgr.exe file. For what we’re trying to do, we need to use the Setup Manager Wizard.

Help me Mr. Wizard!

Double clicking on the Setupmgr.exe file in “C:Deploy” launches the Setup Manger Wizard.

Basically, what you’ll do with this file, is to answer all of the questions that you would normally get during the text mode portion of the Windows XP installation. The
Wizard will save your answers in a text file, which you will eventually put on that floppy disk. Let’s create the answer file next.

I’m going to create a file for our good friend John Doe. (You’ve heard of him, right? Lives in “Anytown, Kansas, 12345”? =P)

He’s got a small baking business there in Anytown (what else would a fellow named “Doe” run?), and he’d like to make an unattended install for his office computers.

He has just a small business, and only has a couple computers. Right now, he just wants to make this disk for his office PC. Next time, we’ll show how to
set up these files to be used with multiple machines.

Change the info I enter for John here to what you’d normally be entering (unless of course, your name is John Doe, and you live in Kansas). 😉

Note: For this to be truly “unattended”, you must answer all of the questions that require answers. There are a number of pages that give you options to choose from,
and some of these can be skipped, but if there’s a blank space (your name, computer name, etc…) fill it in now. Setup will hang at that point of installing WinXP until you enter this
information.

{mospagebreak}

Running the Wizard!

Once you’ve double clicked on the icon, the Wizard opens, and you can begin to enter the info you’ll need to create your unattended floppy disk. I’ll walk you through most of the
pages here.

Wizard01

Click “Next”.

Wizard02

“Create new” (Next)

Wizard03

“Windows Unattended” (Next)

Wizard04

Select which version of Windows XP you have, then “Next”

Wizard05

“Fully Automated” So this will be Unattended when we’re done. (Next)

Wizard06

Select “No” here, as you’ll be installing from a CD. (Next)

After this page, check the box to accept the license agreement, and click “Next”..

Wizard07

Here’s where you start entering your personal info. You should at least enter a name here (organization may be left blank).

In the following screen, select the display settings you usually use, and click “Next”.

After that, select your correct time zone, and click “Next”.

In the following page, you will enter your Windows XP key. IMPORTANT!: It’s possible to mistype your key here, and missing this will halt your installation dead in it’s tracks. Double check the
accuracy of your entry in this page. You won’t get an “invalid key” error while building this file, but you sure will when actually installing Windows using the unattended floppy disk.

On the next page, you’ll need to enter a name for your computer. Enter something (you can always change it later), or the unattended install will halt here, awaiting you to enter a name.
Click “Next” after entering the name.

Wizard08

It’s very good practise to use a password here, and best is to make it “complex”, using letters, numbers and characters. A complex password might be something like: /BjBsP4/.
A real simple complex type password, using both upper and lower case letters, numbers, and characters. Whatever you do use, remember it!.

And always encrypt the Admin password. If someone gets a hold of your floppy, they can read the file and get your password easily if you don’t. If you select the “Encrypt…” box,
when the text file we’re making is done, it’s encrypted in the file, making the floppy more or less useless to someone who gets a hold of it.

Wizard10

If you need to specify an IP address, or DNS Server address, here’s where you can do this.

If your IP gives you an IP address (or you have a router that does DHCP), you can leave this on the default “typical settings” button.

Wizard11

Where John only has a couple computers, he doesn’t have a domain set up. He’s been using the “MSHOME” workgroup since the Win98 days.

If this is your only PC, you can use the defaults, or if you have several computers on your network, configure these settings as needed.

{mospagebreak}

Wizard12

You probably can leave this page blank if you don’t connect by phone. I usually fill in the first two boxes anyway, as I’m not sure if it would hold up
the unattended install if left blank.

Regional Settings (the next page): Just leave the default setting, and click “Next”.

Languages (page after Regional): Here you can add support for any additional languages you might want. Do you spend a lot of time searching various PC components manufacturer’s
websites? Perhaps adding support for Chinese/Japanese characters here will save a bit of time later on.

Make your choices (or choose none), and click “Next”.

Selecting nothing here will come into play in the next part of this series of articles. But we’ll cross that bridge when we come to it. 😉

Wizard13

Hmmm… Looks like John is a bit of a “techie”. =)

On this page, you can configure these settings to where ever you like, and they will be automatically entered as the default for these settings. The first time John clicks on the button
for Internet Explorer, he’ll wind up at this very site here.

Enter you selections, or take the default, and click “Next”.

Installation Folder : Ensure “A folder named Windows” is selected, and click “Next”.

Install Printers : If you have a network printer, enter the URL for it here. If you’re using a local (physically connected) printer, Windows XP will more than likely automatically detect
it and install the appropriate drivers anyway, so you can leave this blank and just click “Next”.

Wizard14

On this page, you setup any commands to run when you first log on to the PC after installing (usually right after installation finishes).

I’ve entered dfrg.msc here. This will automatically initiate the Windows Disk Defragmenter to run. Enter the command, click “Add”, and then “Next”.

Additional Commands : Similar to the above “Run Once”. Enter anything you need (or leave blank), and click “Finish”. This brings up the last page of the Setup Wizard;

Wizard15

Where do you want to save your file today? =P

I simply saved the file(s) generated by the Wizard to the C:Deploy folder we created at the beginning of this article. Save it wherever you like; My Documents, Desktop, etc…

Click “OK”, and your done with the Wizard. HOORAY!

Finishing up

Now, take your floppy disk, and format it.

Open the C:Deploy folder, and right click the new file (unattend.txt) you created. Rename this file to winnt.sif.

Depending on what you entered while creating this file, there may be one or two other files in the folder as well. These would be Unattend.bat and Unattend.udb.
The unattend.udb will only appear if you listed more than one computer. These do not need to be renamed.

After renaming the file to winnt.sif, move it and unattend.bat (and unattend.udb, if applicable) to the freshly formatted floppy disk in your A: drive.

Using the disk you’ve made

The next time you need to install (or reinstall) Windows XP, set the boot order as you normally would (boot from CD-ROM first) to install the OS. Put the floppy into the drive, and reboot.
Windows will automatically look for a floppy disk containing a winnt.sif file.

If you’ve already formatted the hard drive (or it’s brand new), Windows will install at the root of C: using the entire hard drive as one partition.

If the drive has not been formatted, you will need to do that part of the installation manually, when it comes up during the install.

If your drive is formatted (or new), and you’d like to set up the partitions or file system yourself, there’s a pair of lines in the winnt.sif file you will need
to edit. Open the winnt.sif file with Notepad, and change the following lines to this:

[Data]

AutoPartition=0

[Unattended]

FileSystem=*

These lines set to these parameters will force the install to stop so you can manually configure these two items.

That’s it. Set up the partitions/file system (if applicable as above), go to lunch, and come back to a fresh install of Windows XP.

In the next installment:

Required: A CD or DVD burner.

Next time, we’ll use a CD or DVD burner to make a custom Windows XP install disk.

Covered will be; where to put the files we just made, how to safely remove some of the fat from the original disk, to make room for some 3rd party applications, how to
create a regedit.reg file to automatically make some of the changes you make when first installing XP.

Ever wanted to kill off that “Tour XP” that pops up after each install? Or get rid of Messenger so it never comes back? Or perhaps you’d like My Computer on the desktop and
Administrative Tools on the Start Menu by default?

All of these, and much more, can be done with a simple regedit.reg file.

Until next time, Cheers!

Email Brian

Be the first to comment

Leave a Reply