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.
- First, create a folder called Sysprep in the OS drive (mostly C:)
- 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:
- Network card
- Chip or BUS drivers
- Audio drivers
- Video drivers
- 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: https://www-secure.symantec.com/connect/blogs/how-extract-drivers-self-installing-executable
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 deploy.cab file from Microsoft. If you have Windows XP SP 3, you can go here: http://www.microsoft.com/downloads/details.aspx?FamilyID=673a1019-8e3e-4be0-ac31-70dd21b5afa7&displaylang=en
If you have another version of Windows XP, you will need to get the correct deploy.cab file, so please use caution.
Now that you have the deploy.cab 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:
- Choose the Sysprep setup.
- Answer that you want to fully automate the installation
- 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: http://technet.microsoft.com/en-us/library/bb457078.aspx
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:
- A clean version of Windows with basic software and settings.
- All of the PnP drivers for every model of PC you plan to put this image onto.
- A Sysprep.ini file ready to go.
Now I suggest you go to the following web site: http://www.vernalex.com/tools/spdrvscn/index.shtml
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: http://www.vernalex.com/tools/spdrvscn/index.shtml
Some Microsoft sites:
Some info on Sysprep for Vista: http://blogs.technet.com/backroom/archive/2007/02/08/automate-your-vista-factory-installations.aspx
Another Sysprep guide: http://blog.hishamrana.com/2006/02/22/how-to-image-windows-xp-with-ghost-and-sysprep
A guide on how to extract drivers useing WinZIP and WinRAR: https://www-secure.symantec.com/connect/blogs/how-extract-drivers-self-installing-executable