How to run SysPrep on an Upgraded Operating System

I came across an instance where I needed to upgrade a Windows 7 image to Windows 8.1 and then capture that image for deployment with System Center Configuration Manager 2012 R2. I found out shortly after starting this task that when you upgrade an operating system you can no longer run SysPrep. So I started looking around and modifying registry keys and running commands.

sysprep

Below is the method that I found to work perfectly.

Remove this KEY from the Registry:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup\Upgrade

Remove this REG_DWORD from the Registry:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup\Upgrade

Set this REG_DWORD from the Registry:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\CleanupState [Set Hexadecimal Value: 7]

Run this command as Administrator:
slmgr /dli

After your operating system is activated re-run SysPrep and it will work!

– Harry Caskey

41 Replies to “How to run SysPrep on an Upgraded Operating System”

Leave a reply to Tim Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.