1. Running the sysprep GUI
The System Preparation (sysprep)
tool removes unique information on computers prior to imaging them. It
removes a wide variety of computer-specific and user-specific settings
on Windows computers, including the system’s security identifier (SID).
Tip
The SID needs to be unique in
a domain. If multiple computers have the same SID, you end up with
significant problems that can be difficult to troubleshoot.
You can run sysprep either from the graphical user interface (GUI) or from the command prompt. Figure 1 shows the sysprep
GUI with the typical settings selected. This file is located in the
c:\windows\system32\sysprep folder by default. You can launch the GUI
with the following command:
c:\windows\system32\sysprep\sysprep
Note
The path to the sysprep GUI is not known by default, so you must include the full path.
Figure 1 shows two sections titled System Cleanup Action and Shutdown Options, and the Generalize checkbox. The following tables describe these settings.
System Cleanup Action Selections | Comments |
---|
Enter System Out-of-Box Experience (OOBE) | Prepares the computer to be delivered to the user. It causes the system to enter the Windows Welcome phase when it reboots.
Note
Windows Welcome is also called Machine OOBE.
|
Generalize | The Generalize checkbox resets the user-specific and computer-specific settings, including the SID and the activation data. |
Enter System Audit Mode | Audit
mode bypasses the Windows Welcome phase and is used to add additional
devices or applications to an installation. Audit mode is primarily used
by original equipment manufacturers (OEM) and some large organizations
to add additional customization settings.
Note
Because audit mode bypasses the Windows Welcome phase of the
installation, it can’t be used to deploy an operating system to an end
user. You still must select OOBE after booting into audit mode.
|
You have several choices of what sysprep will do after it runs. The most common choice is Shutdown. The following table shows these choices.
Shutdown Options | Comments |
---|
Shutdown | The
system shuts down. The image is now ready to be captured. When you’re
ready to capture the image, turn on the system and follow the procedures
based on the image capture tool you’re using. |
Reboot | If you are ready to capture the image immediately, you can select Reboot. This setting is also commonly used with the Audit mode by OEMs. |
Quit | This simply quits the sysprep application. You can shut it down later. |
Tip
If the system reboots before
the image is captured, it enters the Windows Welcome phase and a new SID
is created. You need to rerun sysprep again to prepare the system before imaging it.
2. Running sysprep from the Command Line
You can also run sysprep from the command line. The most commonly used command is
c:\windows\system32\sysprep\sysprep /generalize /oobe
Tip
This command is the same as selecting the settings shown in Figure 1.
The following table shows the different switches available with sysprep.
sysprep Switches | Comments |
---|
/?
C:\>c:\windows\system32\sysprep\
sysprep /?
| Retrieves help on sysprep. |
/generalize
C:\>c:\windows\system32\sysprep
\sysprep /generalize /oobe
| Removes
all unique system information from the Windows installation. It resets
the SID, clears system restore points, and deletes event logs.
Note
A new SID is created during the specialize configuration pass when the
system is rebooted. Windows activation also resets (as long as
activation hasn’t already been reset three times).
|
/oobe
C:\>c:\windows\system32\sysprep\
sysprep /generalize /oobe
| The out-of-box experience (/oobe)
switch ensures the system enters the Windows Welcome mode when it
restarts. Either an answer file can be used to answer the installation
GUI’s questions or users can answer the questions in the Windows Welcome
mode. |
/quiet
C:\>c:\windows\system32\sysprep\
sysprep /generalize /oobe /quiet
| On-screen confirmation messages are suppressed. This option is useful if you are automating sysprep. |
/audit
C:\>c:\windows\system32\sysprep\
sysprep /audit
| Audit
mode is used by OEMs but is rarely used by organizations. It enables
you to boot into the system and add additional devices or applications. |
/shutdown
C:\>c:\windows\system32\sysprep\
sysprep /generalize /oobe /shutdown
| Shuts down the computer after sysprep completes. |
/reboot
C:\>c:\windows\system32\sysprep\
sysprep /generalize /audit /reboot
| Reboots the computer after running sysprep. Use this option to audit the computer and verify that the first-run experience operates correctly. |
/quit
C:\>c:\windows\system32\sysprep\
sysprep /generalize /oobe /quit
| Closes sysprep after running the specified commands but does not shut down the system. |
/unattend:filename
C:\>c:\windows\system32\sysprep\
sysprep /generalize /oobe /shutdown
/unattend:answer.xml
| Applies
settings from the specified answer file to Windows during an unattended
installation.
You can create answer files with the Windows System Image Manager (WSIM)
included with the Windows Automated Installation Kit (WAIK). |