If you have been following the Scripted OS Install series you have tweaked Windows XP install CD. It has all of the latest and greatest Windows Updates/hotfixes. The CD will also install itself (thats right, Windows will install itself). There is one problem. After Windows has finished installing you will still have to download and install the correct drivers.
Windows XP comes with drivers. These drivers are meant to give a very broad sampling of hardware components in the world today. The problem is that there are thousands of different graphics cards, for example. There is no way that Microsoft could include them all. When you start to think about where Windows is being used and how many different devices it could support - it is easy to understand the lack of driver support.
But, not to worry! You can include all of the drivers you need. The great thing is that you can include all of the drivers you need, no more, no less.
Overview
In this article we are going to learn how to include drivers on our Windows XP CD. We will talk about how to set up our CD to store our drivers, how to tell the Windows Installer where to find the drivers, where we find the needed drivers, and more.
Setting the Foundation
If you do not keep yourself organized when trying to include drivers on the Windows CD, things can get confusing pretty fast. Consequently, there are a few things that we need to to before we start scouring the web for the drivers we need. There are several places that we need to get organized. First, we need to create a folder structure. Then, we need to include that folder structure in our answer file. Now it is time to download the drivers and place them in the appropriate location. Finally, we need to update the answer file to include all of the drivers we need.
Our goal is to include all of the drivers we need on the Windows CD. In order to make them work with the answer file they have to be stored on the C: drive. How can we do that?
$OEM$ Folder (Part 1)
Any files that you want on your C: drive after a Windows installation need to be stored in a folder called $OEM$. Microsoft included this valuable solution in the scripted Windows installation. If you would like to learn more about the $OEM$ folder, check out this article out:
$OEM$ Distribution Folders. I will talk other ways to use this folder in another article (hence the "Part 1" above).
Where is the $OEM$ folder located on the CD? As you can see, on the left is a standard Windows XP CD. If you would like to learn more about the folders in this CD, check out Part 2.
The $OEM$ folder needs to be created in the I386 folder. To create the folder, first double click on the I386 folder. Then, right click on a blank spot in the folder. Go to New >> Folder. Make sure to name the folder $OEM$. There will be some basic file structure. We will talk about the driver folder structure in the next section.
Basic Folders
The first folder that I create in the $OEM$ folder is called "Drivers." I am a pretty simple guy, so in this folder I include all of the hardware drivers. In order to keep my sanity, I like to add the following folders to my $OEM$ folder:
This covers the basic drivers you will want to include. I think it is worth taking a few characters to describe what I include in each folder:
- Audio: This has all of the audio drivers. I don't include HD Audio drivers, to find out why you will have to finish this article. If you want to include any special audio programs that come with your hardware, it can be done after Windows installs.
- Chipset: You may not think that the Chipset driver is important. It turns out that it is very important. If you don't include these drivers Windows will not work properly (you will receive the blue screen of death).
- Modem: Just slow modems in this folder
- Network: In this folder I include both network and wireless drivers. Network drivers are problem free.
- Other: In this folder I include mouse drivers, scanner drivers, and anything else that does not fit in the other folders.
- Video: This folder contains all of the video drivers. It only has the drivers. If you want to install other programs (like ATI Catalyst Control Center) you will have to install them after Windows is done installing.
Like I mentioned earlier, all of the files/folders in the $OEM$ folder get copied to the C:\ drive. During the install process (actually towards the beginning) these files get copied. They will end up in the following path: C:\Drivers\... Just to drive the point home, here is an example:
- C:\Drivers\Audio
- C:\Drivers\Chipset
- C:\Drivers\Modem
- C:\Drivers\Network
- C:\Drivers\Other
- C:\Drivers\Video
Now that these files are on the C: drive, the answer file can see them. Now that we have everything set up and organized, we can add in everything we need to the answer file.
Answer File
In the last article, we talked about the answer file. Below is the section that directly deals with drivers:
[Unattended]
UnattendMode = FullUnattended
OemSkipEula = Yes
OemPreinstall = Yes
OEMPnPDriversPath = "Drivers\Network\1;Drivers\Network\2"
driversigningPolicy = Ignore
AutoActivate = No
WaitForReboot = No
FactoryMode = Yes
NoWaitAfterTextMode = 1
NoWaitAfterGUIMode = 1
Repartition = Yes
UnattendSwitch = Yes
We are going to focus in on the "OEMPnPDriversPath." You will notice that it does not reference the C: drive at all. I guess that is a given. In each folder (for example Audio) I have drivers for several different types of audio cards. I organize them simply. The first audio driver I include is in a folder named "1." The second audio driver is in a folder named "2." You get the idea.
There is also something else to keep in mind. I make sure to organize the "OEMPnPDriversPath" in the following way:
OEMPnPDriversPath = "Drivers\Chipset\1;Drivers\Chipset\2;Drivers\Network\1;Drivers\Network\2;Drivers\Graphics\1;Drivers\Graphics\2;Drivers\Audio\1;Drivers\Audio\2;Drivers\Modem\1;Drivers\Modem\2;Drivers\Other\1;Drivers\Other\2"
Make sure to tweak "OEMPnPDriversPath" according to the file structure you build as you find drivers. Also, if "FactoryMode" is not set to "Yes" it will not use the drivers you have found.
Finding Drivers
The key is finding the right drivers.
Dell
Go to the following website to find the appropriate Dell drivers. I did a quick search for the Latitude D600. If you visit the link, you can see that it is easy to find the drivers you need. I used a packing slip to see exactly what drivers I need.
HP
Go to this page, and search for your computer model. Then you need to pick Windows XP. I did a quick search for HP Compaq dc7100. The linked page shows you a complete list of all of the drivers you may need. You can check your invoices (or a computer that already has Windows installed) to see exactly what drivers you actually need.
Keep in mind that you may need to do a little good old fashioned troubleshooting to see what drivers you need. I have learned from experience that you should always test a driver before deploying it.
What Files do You Need?
As an example of what files you need to include in your CD, go to the SIGMATEL - Driver. We just downloaded a file named: "R90698.EXE." If you have TUGZIP installed, you can right click on the file, and extract it to a folder. If you open the new folder (called "R90698") you will see the following:
We don't need any of these files. Most of them deal with installing the software that goes with the driver. The stuff that we want is in the "WDM" folder. Here is what it looks like:
These are the files we are looking for. When searching for drivers, you need .ini, .dll, .cat, .inf, and .sys files. Those are everything that you need. I would navigate to \WinXP\I386\$OEM$\Drivers\Audio and create a new folder called "1." In that folder I would copy the driver files from the extracted file we downloaded from Dell (the files in the picture above this paragraph).
Here is another example: ATI Drivers. Just for demonstration, download the D800 ATI Drivers: ATI - Driver. Once it is downloaded, extract the file to a folder. The extracted files look like this:
We want to navigate to Driver >> 2KXP_INF to actually find the drivers. Here is what is in the folder:
It has all the files we are looking for (except one with a .sys extention - it is okay). Create a folder in WinXP\I386\$OEM$\Drivers\Graphics (I named it "1"). You need to copy all of these files and the folder into "WinXP\I386\$OEM$\Drivers\Graphics\1." You should be set. Make sure to test it all out. One thing to keep in mind is that this only covers the drivers. If you want any of the other software that comes with the graphics driver, you will have to install it after Windows is done installing.
Current Problem Drivers
The main problem driver is any and all HD Audio Drivers. Why? Windows XP does not natively support HD Audio. You have to download and install a Windows Update. That is just great, unless you are trying to script a Windows install. The reason is this: Drivers are the first thing that Windows installs during the install process. One of the very last things that Windows does during the install process is, you guessed, Windows Updates. Since things are a little out of order, it does not work. Any driver that requires a Windows update cannot be included using the processes in the article.
Conclusion
Using this process I have expanded my tweaked Windows XP CD to support 25 or 30 different hardware types. It works on HPs and Dells. It works on desktops, laptops, and ultra portable devices. It has 20 different video and audio drivers. It has worked out well. It required a lot of troubleshooting, but in the end I got just what I wanted. After you have all of your drivers included, your computer is up and running after an install. It has the Windows Updates you need. It has all of the drivers you need. All of this without entering in any settings, or waiting for anything to download. Pretty sweet deal huh?
Scripted OS Install - Part 3: The Answer File
Scripted OS Install - Part 5: Tweaking Windows (Round 1)