M  E  N  U
 - Guides
 - Links
 - Tools
 - Themes


SysPrep Guide: Generalized Instructions - [2/8] +

Generally with SysPrep you will need to set up a Windows configuration that you want it. You then need to run SysPrep and Windows will shutdown. At this point the Windows installation is in a template mode and the next time it starts up it will automatically run the SysPrep mini-setup that will customize the template computer to the hardware it is started on. So, after SysPrep shuts down the computer you need to take an image using your favorite imaging utility to save the template image. The instructions below provide a better outline of how and when to use SysPrep, but your needs may vary. It should be noted that if you're using Symantec Ghost Console that it has the abilities to automatically apply SysPrep, but I am fairly unfamilar with that configuration because it creates more problems then it is worth. If you want to use it that way then you will need to adapt some of these instructions. Once you have a working image you may need to update it from time to time to include the latest programs, updates, policy changes, etc. so keep that in mind when developing it.

Install Windows with the desired HAL
During the installation of Windows you can use F5 to choose the most compatible HAL for your target hardware. This is covered in depth in the HAL section of this guide since it is one of the more complicated issues. You can also switch the HAL if Windows is already installed.
Apply operating system patches and updates
The first step should be to completely patch Windows to the point that you need them to be. By this I mean some institutions do not prefer to use the latest Service Pack since their institution needs to completely test them first. Be sure to safely patch the operating system too, and by that I mean make sure your OS is firewalled at least until safely patched so it's not infected by a worm.
Configure the administrator account to your needs
Typically I customize the administrator account on my deployed images so it is easier to support afterwards. In my case I make the administrator so that it has special tools, icons, etc. so it's easier to work with. If the image will always be joined to a domain then this may not matter as much because this may not be the account you use to administrate the workstation.
Create a template user account
When a new user is created on the template account and logged into for the first time it copies the settings from the "Default User" profile. So, to adjust the way new accounts look and feel I create a temporary account. I suggest using a unique name for this user for reasons explained in the next step. In Windows XP SP2 you will need to apply a patch (KB887816) if you don't want your Administrator account settings copied into the Default User profile after running SysPrep.
Install programs under the template user account
Log into the template user account and install of the programs you want to use and set up the look and feel the way that you want it. I typically disable themes, revert to the classic start menu and clean up many of the interfaces to make them more straightforward so the users can navigate the system more easily. Before finishing I usually edit the registry and remove references to the template user account name (why it should be unique) by doing a search. I do this because some programs hardcode paths to the profile directory and that will be problematic if this becomes the template settings. You shouldn't change Windows settings such as the location of the Desktop or My Documents folders though because they will be fixed automatically in step 7.
Restart the computer
You should restart your computer before you import the settings from the template account into the Default User profile to make sure all file handles are unlocked.
Copy the settings of the template account into the "Default User" profile
After the computer has been restarted log into the Administrator account and copy the settings of the template account that you made into the Default User profile. This is accomplished from the "System Properties" dialog under the "Advanced" tab and in the "Settings" of "User Profiles". When you copy the settings it will move all files from the template account into the Default User profile, except it won't copy the "Local Settings" folder so if you need those settings you will need to copy them manually. You should verify that the permissions are correct for the Default User Profile because they should be set to read only for normal users.
Remove the template account
I typically then remove the template account by deleting it from the local users and groups manager and then make sure that the profile directory has been removed.
Create a directory for SysPrep (typically this is c:\sysprep)
SysPrep is extremely picky about what the folder is named and where it is located. It has to be found on the hard-drive that contains the Windows installation and it has to be named sysprep. Failure to do this will make SysPrep not be able to correctly identify settings because it won't be able to find its settings files.
Copy in the required files for SysPrep
There are only a few files needed for SysPrep, but I usually just extract all of the SysPrep files from the deployment cab to the c:\sysprep folder in case I need them in the future, such as the documentation.
Create a drivers directory for SysPrep (typically this is c:\sysprep\drivers)
You then should create a directory to contain your drivers. It does not matter where they are, but I would suggest using a path that is very short. If your image only needs to work on hardware that is the same then you don't need to worry about this. Most drivers are treated in a similar fashion but mass storage drivers (drivers for the device that control hard-drives) are more critical for reasons I cover in the mass storage section. For non-mass drivers you may want to use my SysPrep Driver Scanner to make life easier for you.
Create a SysPrep script (sysprep.inf) in the SysPrep directory
SysPrep should contain a script (sysprep.inf) in the same directory as the SysPrep executable (sysprep.exe) and the other support files. It is called the SysPrep Answer File and it directs SysPrep what it should do when executed. I usually create the initial answer file with the Microsoft Setup Manager Wizard (setupmgr.exe) because it is easier than creating one from scratch, and then I customize it to fit my exact needs. Please see the inf section for additional help with the answer file.
Add a generic mass storage section to the sysprep.inf
If the image will be deployed to computers with mass storage devices, which is most likely required if duplicating to different computer models, then you will need to specify the mass storage in the sysprep.inf. Since this is one of the most complicated parts I cover this more completely in the mass storage section.
Apply finishing touches
Typically I don't make an image over the course of a single day unless I am in a rush so at this point you may need to apply more Windows updates or go back to a previous step to update a program. You also at this point may want to create a new user and make sure the Default User account works the way you want it to.
Execute SysPrep
When you are ready to reseal the computer into a template installation then you can run SysPrep. Since this is a delicate part of the procedure I have more information about this in the execution section. Before running SysPrep you may also want to save an image (like in step 10) in case you made a mistake and want to revert to the point of before running SysPrep.
Image the computer with your favorite program
Once SysPrep successfully shuts down you should then take an image (data snapshot) of the computer to save the work you have done. This can be done in many ways, but typically I use a bootable CD such as BartPE and save the image to a shared folder on the network. This step varies a lot depending on your infrastructure and the imaging tools you own. If you accidentally start up Windows after SysPrep has shut it down then it will go through the mini-setup and you will have missed your opportunity to save an image. I also recommend running a check disk (chkdsk) of the drive before taking an image because a corrupt image may not be deployable or create problems in your future if it does work.
Duplicate the image onto other computers
Using the same program you used to create the image you can now deploy it with it in whatever method your institution uses. It is hard to be exact here because this can vary a lot.