Have you ever wanted to smoothly automate the Windows installation process? It is nice not having to press any buttons or type a CD key. In this article and the following, I will discuss how to automate the installation of Windows 2000/XP. Due to the size of this topic I am going to break the content up into several articles. The first installment will consist of compiling a bootable Windows 2000/XP CD with the latest service pack slipstreamed in. Combined with a floppy disk, you will be able to automate the installation of Windows 2000/XP. There are a ton of resources available for this topic and I will include them at the end of this article. They will apply to the whole series I have planned on automating the installation of the Windows OS. (Note: In this example I am using Windows 2000. You can easily substitute the same procedure for Windows XP Professional. So where you see a reference to anything Windows 2000, just Change it to Windows XP)
Resources You Will Need
Ø Windows 2000 Pro or XP Pro CD
Ø Latest Service Pack (SP 4 for Windows 2000 or SP1a for XP)
Ø Blank floppy disk
Ø Compression tool like WinZip or Winrar
Ø Hard drive space (a gigabyte is sufficient, but more is always better )
Assumptions: (These are the drives I will reference in the article and what devices they are)
D:\ = Hard drive
E:\ = CD-rom Drive
Beginning Steps
To start off, create a directory and name it Win2k_CD. The name of the directory does not matter except to you. I find it easier to make the directory names descriptive and to work off the root of the drive. In this example I will be working from my D:\ drive. Next copy the i386 directory from the Windows CD to the Win2k_CD directory you created. I find it easier to work from a command prompt using xcopy. An example would be:
xcopy /E /I e:\i386 d:\win2k_cd\i386
Below is an image of the directories that I created.
Slipstreaming the Service Pack
Next, lets slipstream the Windows service pack into the installation. First you must download it from Microsoft, if you have not done so already. Please follow the below links to the service pack you need.
For Windows 2000 SP 4:
http://www.microsoft.com/Windows2000/downloads/servicepacks/sp4/download.asp
For Windows XP Pro SP1a:
http://www.microsoft.com/windowsxp/pro/downloads/servicepacks/sp1/network.asp
After downloading the service pack, extract it to the Win2k_SP4 directory. Again, this is my naming convention and you can use whatever you like to make it easier. So now you should see an i386 directory created within the Win2k_SP4 directory.
In order to slipstream the service pack into the Windows 2000 directory, open a command prompt. Browse to the D:\Win2k_SP4\i386\Update directory. While in the update directory type the following command (see image below for example):
update /s:d:\win2k_CD
When the process has finished a notification window will appear with the statement Integrated install has completed successfully.
Building the CD
Now that we have the service pack slipstreamed into the Windows i386 directory, we can begin to build the CD. You will need to download the following zip file (choose the one you need) and extract the contents into the D:\win2k_CD directory.
For Windows 2000, download this file: SP4_BootFiles.zip [2 kb]
There are 3 files in the SP4_BootFiles.zip:
- CDROM_IP.5 (tells the installation that it is a Windows 2000 Professional install)
- cdromsp4.tst (identifier file for service pack 4)
- w2kboot.bin (the boot sector for the cd)
For Windows XP, download this file: XP_BootFiles.zip [2 kb]
The XP_BootFiles.zip contains only one file.
Burning the CD
I will cover burning the CD using Ahead’s Nero Burning Rom (www.nero.com). You can also use other burning applications like Easy CD Creator, but you will have to apply the settings for the burn process yourself.
Begin by starting Nero and start a new compilation using the CD-ROM (Boot) option like in the image below.
Next, on the Boot tab, you will need to set the image file or boot sector. Select the w2kboot.bin file. Check Enable Expert Settings and set emulation to“No Emulation. Lastly, set the Number of Loaded Sectors to 4. See the image below for the settings.
On the Label tab, you can set your own settings here. I would set the volume label to something like W2KSP4_EN. All other fields are optional to set. Now you can click on New as shown below.
In order to burn the CD you have to copy everything within the Win2k_CD directory into the project. Remember to copy everything within the Win2k_CD directory and not that directory itself! See the image below.
Click on Burn and wait till it is done. You now have a bootable Windows 2000 CD with service pack 4 already integrated into it. Slipstreaming the service pack onto the CD only takes us so far. What we really want is to automate the installation of the operating system so we can pop in the CD and let it install all on its own. So next we will have to create a winnt.sif file that will provide the answers for the installation’s questions.
The Winnt.sif File and Automated Installation
Now that we have the CD ready, let's put together the automation. Microsoft has made vast improvements regarding automating processes including the installs of its OS’s. An article you will want to have is the Unattend.doc. It breaks down the different parts of the answer file and that is all the winnt.sif file is! All you need to know is the syntax, which is simple, and know which items you want to automate. I am going to cover the Windows 2000 answer file. XP is essentially the same, but has some other features that I will discuss in a later installment.
Creating an answer is easy. First we will need to use Setup Manager (setupmgr.exe) from the Deploy.cab file located on the Windows 2000 CD. On the Windows 2000 CD, there is a Support\Tools folder with the Deploy.cab in it. Extract the Deploy.cab file to a temp directory. There are several other items that were extracted, too, and will be covered in the later sections. Run Setupmgr.exe and walk through each window. The second to last window will prompt you to create a distribution folder. We are not doing that in this instance so select No, this answer file will be used to install from a CD. The final window determines the output location of the answer file. The default name is Unattend.txt.
After the file is saved, rename it from Unattend.txt to winnt.sif. You can then copy this file to a blank formatted diskette.
Let's Start Installing
Now that we have our answer file and CD, we can start the install. With the CD in the drive, start up the computer. The CD will prompt you to press any key to boot from CD… Once you hit a key, insert the floppy diskette into the drive. The installation will now check the floppy drive to see if there is an answer file for it to use and—Voila!
Most of the time the first automated install will not work as planned. There will be steps that are not automated that you will want to automate. Check out the Unattend.doc file that was extracted from the Deploy.cab. In there you will find all the different parameters for automating the installation. Next week I will dive into installing from a remote share and adding hot fixes to the installation as well.
Like I said on the Forum, the second section will be out soon, watch out. . .