← All Posts

Deployment

Running Sysprep More Than 3 Times

Windows limits Sysprep to 3 runs by default. Here's how to reset the counter when you need to update your golden image.

ImagingSysprepWindows

By default, Windows allows sysprep /generalize to run only 3 times before refusing with a fatal error. Microsoft's official guidance is to reinstall. But when you're maintaining a golden image that needs periodic updates, that's not practical.

The fix — reset the Sysprep counter:

  1. Open regedit and navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform
  2. Set SkipRearm to 1
  3. Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus
  4. Set CleanupState to 2
  5. Set GeneralizationState to 7
  6. Run msdtc -uninstall then msdtc -install
  7. Sysprep is now reset and can run again

Modern approach: Rather than repeatedly sysprepping the same image, use a layered imaging strategy: maintain a thin base image and apply customizations via task sequences (MECM), provisioning packages (PPKG), or DSC (Desired State Configuration). This reduces the need for frequent sysprep runs.

For Windows 10/11: Microsoft has improved the sysprep limit in recent builds, but the registry reset method still works when needed.

Running Sysprep More Than 3 Times — Harry Caskey