Image Preparation Facts
Use the Sysprep utility along with WinPE and Windows installation answer files to configure new installations of Windows. Using Sysprep you can:
- Prepare a system image for deployment to other computers.
- Control how the Windows installation process proceeds by identifying an installation phase to complete at the next system startup.
- Boot the computer into the Windows installation audit mode to customize the installation after the image has been applied to the computer.
- Boot the computer into audit mode to test and verify the installation.
- Boot the computer to the Windows Welcome screen to provide the end user with an out-of-box experience.
To manage system images and the Windows installation process, you run Sysprep with one or more of the following switches:
|/audit||/audit forces the computer to start in Audit mode instead of Windows Welcome mode. In Audit mode, also known as resealmode, you can add additional drivers or applications and test your image after deploying it.
When using an answer file, use the Microsoft-Windows-Deployment\Reseal\Mode=Audit option to enter Audit mode.
|/generalize||Run the Sysprep /generalize command to remove machine-specific information from the installation. This process runs the generalizepass of Windows Setup which removes the SID, clears logs and restore points, and removes other machine-specific information.
When using an answer file, use the Microsoft-Windows-Deployment\ Generalize option.
Note: You must run this option if you intend on transferring the image to a different computer. When Setup starts at the next reboot after the generalize pass, the specialize pass of the installation will occur (unless the system is configured to boot into Audit mode).
|/oobe||/oobestarts the computer in the Windows Welcome or out-of-box experience mode. This allows a user to customize their system, such as creating accounts and setting the computer name.
When using an answer file, use the Microsoft-Windows-Deployment\Reseal\Mode=OOBE option.
|/shutdown||/shutdown shuts down the computer when Sysprep completes.|
|/reboot||/reboot restarts the computer when Sysprep completes. Use this command to ensure that the first-run experience operates correctly.|
|/quiet||/quiet suppresses on-screen messaging when using an answer file.|
|/quit||/quit closes Sysprep once it is complete.|
|/unattend||/unattend followed by the path and filename specifies the answer file to use when Windows Setup resumes at the next restart. Use this option if you are using a custom answer file (not named Autounattend.xml or Unattend.xml) for a specific installation stage or a file in a location that is not searched automatically.|
Be aware of the following when using Sysprep:
- Several Sysprep switches may be used in the same command. For example: c:\windows\system32\sysprep\sysprep.exe /oobe /generalize /shutdown
- Running Sysprep with no switch opens the graphical version of the utility. In this version, you can:
- Choose the setup mode (OOBE or Audit mode).
- Choose the generalize option.
- Choose the shutdown option (quit, reboot, or shutdown).
- Sysprep is available in the %WINDIR%\system32\sysprep directory.
- Only users with administrator privileges can execute Sysprep.
- Only one Sysprep instance can run at a time.
Use the following process to create, prepare, and deploy a Windows installation image.
- On the reference computer, install Windows using either an attended or unattended installation.
- (Optional) At the Welcome Screen, press Ctrl + Shift + F3 to restart the computer in Audit mode. Optionally, you can use scripts or parameters in the answer file to restart the computer in Audit mode.
- In Audit mode, add drivers and install applications that will be used by all computers that will use the system image. You can reboot the computer as many times as you like and it will continue to restart in Audit mode.
- After you have finished making modifications to the reference computer, run Sysprep with the generalize, oobe, and shutdown options. Note: To retain additional drivers that do not exist in the default driver store, make sure the answer file includes the Microsoft-Windows-PnpSysprep\PersistAllDeviceInstalls option before running sysprep /generalize.
- Boot the reference computer using WinPE. Capture and save the image.
- Use deployment tools to deploy (install) the image to the target computers.
- (Optional) To customize the image after it has been deployed to a target computer, for example to install drivers for the specific computer or install applications available only for users of that computer, complete steps 2 through 4 to customize the target computer.
- When the computer restarts, the Windows Welcome screen is shown, giving the user the chance to finish and customize the installation.