Video Screencast Help

How to Create a Generic Windows XP Image

Created: 05 Mar 2009 • Updated: 06 Nov 2012 | 8 comments
Language Translations
Cobra7's picture
+13 15 Votes
Login to vote

What this article is supposed to help you accomplish is to make a single image with the help of Sysprep, that can be deployed onto any PC regardless of it's hardware. This will save server space as each model will no longer need its own image file, and make updating images with new software or Windows Patched much easier.

In theory this is supposed to be done with Symantec Ghost; however I will do my best to keep it to a minimum so that hopefully Altiris RapidDeploy, Norton Ghost and other image programs will work with this. This is also intended for Windows XP, but very slight modifications can be done to make it work for Vista.

Also note that this is a guide, not a cookbook. What I am putting in here works for me and should be used for reference. At the end of this article I will post other links to web sites that I researched to figure out how to use Sysprep, so I suggest reading this and those web sites and create your own procedure based on the tools you have and your needs.

Step 1: Preparing Windows XP

The first thing you will need is a clean install or clean image of Windows. This is essentially a brand new copy of Windows installed on the computer.

Next you will need to configure Windows XP. What you need to do is remove any software that you don't want on every PC (such as the Games folder for example), install software every user will need (The updated Adobe Reader and Ghost Console Client for example), and change the Windows settings (turning off the firewall for example).

What you do not want to do is install software that only one department in your company will need. For example you do not want to install any Computer Aided Drafting programs drafters will use but no one else will.

Essentially what you want to do is get the PC ready so that when you install the image onto a new PC, it is ready to accept a user's specific software and settings and then go out the door. I figure most companies like mine will already have procedures on this and what they expect to be on a basic image.

Step 2: Collecting PnP Drivers

You're going to have a lot of files so I suggest you start organizing right away.

  1. First, create a folder called Sysprep in the OS drive (mostly C:)
  2. Inside the Sysprep folder create another folder called "Drivers"

Now you should have small file tree of C:\Sysprep\Drivers

The idea is to have all of the basic Sysprep files you will be using inside the Sysprep folder, and all of the Plug and Play (PnP) drivers sorted in the drivers folder.

Now you will need to start hunting down the drivers which is always tons of fun. I suggest going to the manufacturer's website and search for the drivers each model uses, but do not download them. Instead find out who makes what and get the model number.

Then I suggest going to each manufacturer and download the drivers from there directly. That way you are sure to have the most recent drivers available.

The drivers I suggest are:

  1. Network card
  2. Chip or BUS drivers
  3. Audio drivers
  4. Video drivers
  5. Mass storage drivers*
    *If your using GSS, you can use the DeployAnywhere tool to insert these drivers.

As you download these files, I suggest not putting them in the Sysprep directory, instead put them in a temp folder somewhere. The reason is that most drivers you download are in an .exe format and you will need to extract them.

To extract drivers from an .exe file you will need to run the file with the switch to extract them. Most of the time there is a help file that will tell you what it is. Sometimes running it with /? Will give you the options.

When you have the switch, there are two ways I like to run it. One is to use the command prompt and type it in manually. The other is to just make a Windows Shortcut of the .exe file, edit it to add the switches.

For example most of the Intel drivers require an /e switch to extract and /f to tell it where to extract.

As was pointed out to me, another way to extract the drivers from .exe files is to use WinZip or WinRAR. To see how to do this, please go here:

One you have all of the drivers needed for all of the models of computers you plan to use this on you should have a file tree that looks something like this:

Lastly, before you move on, I suggest cleaning up your folders some to remove any applications and drivers you will not need (DOS, Windows 98 drivers for example). However don't be too worried about the size of your Sysprep folder because after it runs for the first time it is deleted automatically.

Step 3: Preparing Sysprep

For Sysprep you will need to get the file from Microsoft. If you have Windows XP SP 3, you can go here:

If you have another version of Windows XP, you will need to get the correct file, so please use caution.

Now that you have the file, you will need to open it and extract all of the files to the c:\Sysprep folder we made earlier.

You will now need to run the setupmgr.exe application to create a Sysprep.ini file that will guide your computer threw setting up Windows. I will not tell you every step you will follow, I'll just go over the highlights.

Use the following steps to go threw Setupmgr.exe:

  1. Choose the Sysprep setup.
  2. Answer that you want to fully automate the installation
  3. Then start filling in the data that best suites your needs.
         A. Product Key: You will need to use one provided by Microsoft, if you type in an OEM key, your Windows will need to be reactivated 30 days after being reimaged. Please go to the following link for more information:
         B. Computer name: I suggest a random computer name and joining to a generic workgroup. Reason for this is so you can image more than one PC and you wont have any trouble with multiple names on the domain, and it will keep your Active Directory clean. You can use the configuration task in GSS or just manually change the PC name and join it to the domain when your setting it up for an end user.

So now you should have your Sysprep.ini file somewhere. Locate it and open it up, there is still some more to do.

You will need to put the following information in the Sysprep.ini file. In the following picture, you will have some of these lines, the ones you do not, you will need to add to your Sysprep.ini file.

This next picture is the Sysprep.ini file I use with some slight modifications.

If you have any further questions about Sysprep, I will have a bunch of links underneath. Please check those before asking about them here.

Step 4: Putting it all together

By this point you should have:

  1. A clean version of Windows with basic software and settings.
  2. All of the PnP drivers for every model of PC you plan to put this image onto.
  3. A Sysprep.ini file ready to go.

Now I suggest you go to the following web site:

For this guide you will need to download SPDrvScn. The reason for it is because we need to tell Windows to load all of our drivers into the registry otherwise Windows will not look there when it searched for PnP drivers. There is a way to type it into the SysPrep.ini file, but it holds very few drivers before it gets capped.

When you download it, put it in the C:\Sysprep folder. When you have it downloaded, run it once in Windows mode and have it scan. Make sure it scans all of the drivers you will need. If you drivers are in c:\Sysprep\Drivers you should be good to go. Next you will need to create a batch file:

Now you are almost ready to start. First thing is that after all of your hard work, I suggest you copy your C:\Sysprep folder and all of the drivers to a safe location, such as a network server. The reason for this is if you need to do this again, such as to run MS updates, you can skip steps 2 and 3. You would just re-image the PC, update it, copy the Sysprep folder to the PC and kick off the script.

At this time, if you are using a Boot Disk/CD/Flash drive to capture the image of the PC, now is the time to put it in.

At this time run the Sysprep.bat file. Your computer will reboot. This is when you must capture the image. When you are done capturing the image, go ahead a boot the PC normally and let it run. It will go into a mini-Windows setup as it scans for PnP drivers.

When it is complete, open the Device Manager and make sure you add any drivers Windows is missing to your saved Sysprep folder and create another image.


These are most of the places I went to learn how to do this. As I said before, this is not a cookbook. I would recommend going to these sites and teaching yourself how to use Sysprep, then you can tailor it to your needs.

The site to get SPDrvScn and learn how to use it any why:

Some Microsoft sites:

Some info on Sysprep for Vista:

Another Sysprep guide:

A guide on how to extract drivers useing WinZIP and WinRAR:

Comments 8 CommentsJump to latest comment

m_ocb's picture

Hi !

I have done like you describe and it work almost perfect, after searching in the web i've found that can be related to the NLite.

Everything runs perfect excepts on the first run, mini setup asks for some files, depending on the target machine. On my company we use HP and the image was created at home in my Asus Motherboard that is very different from the target machines but it happens if I click cancel the mini setup continues with no problem. Could you tell if there’s a problem using or creating an base image with a copy of XP molded in NLite.
I must give you my compliments for your work.
Thanks and keep doing the good work.

Login to vote
jpusey's picture

This is not working for me, after completing the steps and image a PC. It boot to the SAFE mode screen and restarts, doesnt matter which option i select ( keep restarting).

HP DC7800
HP DC5350 – doesn’t boot to windows
HP DC5100 
HP D530 created image with this model
HP D510/51s


Thanking you in advance.

Login to vote
jharings's picture

is an incompatible HAL from Microsoft. Check out the excellent articles - SP3 is out by Vortex0007 and adding storage drivers by Brandon.

Jim Harings
HP Enterprise Services
1st Rule of Connect Club: Mark the post that helped you the most as a 'solution'. 2nd Rule of Connect Club:You must talk about Connect club.

Login to vote
jpusey's picture

i changed the HAL to ACPI

Login to vote
jharings's picture

do you mean that you started over and used that as your base HAL? In addition the machine you created the image on, is it set (in the BIOS) to compatiliby or AHCI (Sata) mode? If it is set to one or the other, and the other systems are set to something different, they will not work.

Jim Harings
HP Enterprise Services
1st Rule of Connect Club: Mark the post that helped you the most as a 'solution'. 2nd Rule of Connect Club:You must talk about Connect club.

Login to vote
jpusey's picture

ok, so im guessing progress but now its stuck at the safe mode srceen...Not restarting anymore but will not boot to mini setup.

Login to vote
Brett_M's picture

After reseal of image and reboot a window pops looking for c:\sysprep\i386.  You can click the X and close this to bypass if it is happening on the computer which you created the image from.  If you place the image on a new computer you lose the ability to click on the X because the keyboard and mouse are unresponsive.  I have even tried booting with a PS/2 keyboard but to no success.  How can I keep this window from coming up to search for i386?  Is there something in the .inf file I need to modify?

Login to vote's picture

hi, its great work....

i have one question with me,... is it possible to deploy window xp sp2 to from windows xp pc....i am, very much confused with it so,please reply me .

thank in advance

Login to vote