The easy way to get around the three time limit of sysprepping is to either a) use a virtual machine and save a snapshot before the first time you sysprep, or b) capture an image through the console of the state before sysprepping, and then deploy it when it to the same class machine when it needs updated. If you accidentally reached the three rearm limit without having to start over from scratch, here is a step by step how to get around it.
1) Open up Registry Editor. (Start > Run > regedit)
2) Browse to HKEY_LOCAL_MACHINE\System\Setup\Status\Sysprep Status.
3) Change the value of CleanupState to 2. (0x00000002)
4) Change the value of GeneralizationState to 7. (0x00000007)
5) Browse to HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\SoftwareProtectionPlatform.
6) Change the value of SkipRearm to 1. (0x00000001)
7) Open an administrative command prompt. (Start > Run > cmd... right click on the cmd icon and go to Run as Administrator)
8) Type msdtc -uninstall and push enter. Wait a minute and reboot.
9) Type msdtc -install and push enter. Wait a minute and reboot.
10) Browse to c:\windows\system32\sysprep. Delete the panther folder.
11) Run sysprep. It should now complete, and you can capture the image.
This will have to be done every time you capture the image, but it still is less time consuming than starting over from scratch.
I've found another option that has worked well for us. After setting up a system, right before running sysprep, I capture the image in its pristine state.
Using the correct version of ImageX.exe for the architecture, I use
IMAGEX.EXE /COMPRESS MAXIMUM /FLAGS Enterprise /CHECK /VERIFY /BOOT /CAPTURE C:\ D:\NewWimFile.WIM "Descriptive Image Name"
The flag value of ENTERPRISE can be any of the following:
When the time comes to make changes to my image, I restore the original, unsysprepped version of the system.
IMAGEX.EXE /VERIFY /APPLY D:\NewWimFile.WIM 1 C:\
The value 1 represents the index number of the image in the WIM you want to use.
Thank you so much for posting this. I've made a script based off of this article. I've found that you do not need to reboot after running the msdtc commands. Copy the following below to a text file, make any changes you may need, save it as a batch file (.bat) and run it as admin.
reg add "HKLM\SYSTEM\Setup\Status\Sysprepstatus" /v CleanupState /t REG_DWORD /d 00000002 /F
reg add "HKLM\SYSTEM\Setup\Status\Sysprepstatus" /v GeneralizationState /t REG_DWORD /d 00000007 /F
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v SkipRearm /t REG_DWORD /d 00000001
rmdir /Q /S "C:\Windows\System32\Sysprep\Panther"
del /Q "C:\Windows\System32\Sysprep\Sysprep_succeeded.tag"
ECHO Beginning Sysprep. The system will shutdown when complete.
"C:\Windows\System32\Sysprep\Sysprep.exe" /oobe /generalize /shutdown