SysPrep for Beginners for Cloning Windows

Appletax

Well-Known Member
Reaction score
348
Location
U.P. of Michigan
As someone who had never used SysPrep before, I found that many things I came across regarding SysPrep were not very useful to me, so I wanted to share two resources that I think are awesome for learning how to SysPrep a machine.

How to Use Sysprep to Customize Windows 7 and Windows 8

Components - tells you about the different components available to customize an answer file

My situation: bought some Dell OptiPlex 380s from my community college for $25 each, refurbished them, and flipped for a profit. I wanted to get a perfect installation with all the settings and software I wanted and then create an image of it and place it on the other systems to save a ton of time.

Simply making a backup image with a program like Acronis isn't good enough as Microsoft says that you need to SysPrep the system to make it useable on another computer. SysPrep creates a new Security ID, resets Windows Activation, and more. It makes it so that the install is unique for each computer.

I created an answer file with only one thing - CopyProfile (mentioned in resource above). After using SysPrep you have to create a new user account. With CopyProfile enabled the new account is setup almost identical to the base one (the original one used in the install), so I barely have to do anything to the new account.

After making the answer file, I placed it in C:\Windows\System32\sysprep so that it's in the same location as the SysPrep program. There's no sensitive info in the answer file like domain/user passwords so this is secure.

Once ready to SysPrep, I simply opened a command prompt, used CD C:\Windows\System32\sysprep to get to the SysPrep.exe program, and then ran the following command:

sysprep.exe /generalize /shutdown /oobe /unattend:C:\Windows\System32\sysprep\MyAnswerFile.xml.

(Resource above explains how it works).

After SysPrep runs the system shuts down and then you make a clone of the drive. Reboot and the system sets itself up again - you can add a new user, activate Windows, and more.

It makes the system just like an OEM system you'd buy from HP or Dell. Especially if you do this using the built-in admin account.

Note:

Avast! Free Antivirus broke SysPrep. It caused an infinite loop error. I had to reimage the machine, remove Avast!, run the Avast Clean Uninstall program, and run SysPrep again.

When SysPrep failed, I used the article How to Fix Reboot Loop SysPrep Error to read the SysPrep log and find the culprit.

Error.jpg
 
Last edited:
Don't know if it still works, but the Avast! loop was an issue I came across too. The fix was to simply restart the machine when it reached the "Installing Hardware Devices" 'Light beam' animation. This was Win7 days. Would be interesting if that is still the case.
 
Avira does this too. I don't put any AV in my images for this reason.
 
I include Security Essentials on my Win 7 images, they did have bugs but all is fixed. When the system boots it will prompt to install SE, if you cancel, it proceeds to uninstall. Works quite well.
 
Don't forget that the client needs 1 x Windows Volume Licence for you to create a golden/master image - see https://community.spiceworks.com/how_to/124056-reimaging-rights-for-windows-10-licensing-how-to

You are not allowed to image OEM versions of the OS, even if it used to work properly with Windows XP/7

Because you need 5 points to start an Open Licence I would buy 1 x Windows 10 volume licence and then 4 x of the cheapest things I could find on the volume licence list, unless they actually needed other software to make up the points.
 
Don't forget that the client needs 1 x Windows Volume Licence for you to create a golden/master image - see https://community.spiceworks.com/how_to/124056-reimaging-rights-for-windows-10-licensing-how-to

You are not allowed to image OEM versions of the OS, even if it used to work properly with Windows XP/7

Because you need 5 points to start an Open Licence I would buy 1 x Windows 10 volume licence and then 4 x of the cheapest things I could find on the volume licence list, unless they actually needed other software to make up the points.

Assuming OP is a registered refurbisher and got the appropriate refurbish licences for the systems, then the original post is another example of reimaging appropriately.
 
Don't forget that the client needs 1 x Windows Volume Licence for you to create a golden/master image - see https://community.spiceworks.com/how_to/124056-reimaging-rights-for-windows-10-licensing-how-to

You are not allowed to image OEM versions of the OS, even if it used to work properly with Windows XP/7

Because you need 5 points to start an Open Licence I would buy 1 x Windows 10 volume licence and then 4 x of the cheapest things I could find on the volume licence list, unless they actually needed other software to make up the points.

Certificate of Authenticity/Product Label right on the tower. Activates every time. If I had to pay for a Windows license I would not be able to do this. Goodbye profit.
 
Certificate of Authenticity/Product Label right on the tower. Activates every time. If I had to pay for a Windows license I would not be able to do this. Goodbye profit.

Just because it activates doesn't mean you're in compliance. Technically you should be using the manufacturer's image.
 
Just because it activates doesn't mean you're in compliance. Technically you should be using the manufacturer's image.

So to be in compliance I would have to install a fresh copy of Windows on every system instead of imaging, That's silly. I am happy not being in compliance as Windows 7 pro was already paid for when the computers were originally purchased. Paying for another license is double dipping by Microsoft - just like when a car is sold and gets taxed every single time it's sold. It's the law but it ain't right.

I bought these systems for $25 each and sell them for $125, thus making a $100 profit. I am poor and need this opportunity. Microsoft is an ultra-huge, multi-billion dollar company. They do not need my money for this. They were paid already for the license on this system. They made money, now it's time for me to make some.
 
Last edited:
Certificate of Authenticity/Product Label right on the tower. Activates every time. If I had to pay for a Windows license I would not be able to do this. Goodbye profit.
You don't need to buy a 1 x Windows Volume Licence for every machine, you just need one licence to be entitled to create and maintain a master image and deploy it using imaging software. The OEM licence is still needed on each target machine for compliance. Also see the PDF here for more unnecessarily complex details: https://www.microsoft.com/en-us/licensing/learn-more/brief-reimaging-rights.aspx
 
So to be in compliance I would have to install a fresh copy of Windows on every system instead of imaging, That's silly. I am happy not being in compliance as Windows 7 pro was already paid for when the computers were originally purchased. Paying for another license is double dipping by Microsoft - just like when a car is sold and gets taxed every single time it's sold. It's the law but it ain't right.

I bought these systems for $25 each and sell them for $125, thus making a $100 profit. I am poor and need this opportunity. Microsoft is an ultra-huge, multi-billion dollar company. They do not need my money for this. They were paid already for the license on this system. They made money, now it's time for me to make some.
That was my sentiment for a long time. Microsoft SAM audits are common and they don't seem to report any unlicenced use of imaging - YET! One day one of your clients may fall foul of a Microsoft SAM audit and when that happens Microsoft will ask your client for cash - which will make you look very dodgy to your client.

Best to get out of the habit and stick to Microsoft rules, so far as we can work them out! The cost is about £153 for 1 x volume licence and a few quid for other times to make up the five points needed for a new volume licence agreement. If you are imaging 50 machines that's a few quid on top of each one.
 
script to use when you need to update an Image or SYSPREP a second or third time.
has worked for me everytime:


@ECHO OFF

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

msdtc -uninstall

timeout 120

msdtc -install

timeout 120

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
 
Back
Top