How to extract deployed Windows without retaining installed users and records

changfoster036

New Member
Messages
29
Reaction score
0
How to extract deployed Windows without retaining installed users and records;
I am building an older Windows server and when integrating updates some of the updates need to be implemented after deployment.
In addition to replacing the undeployed registry,I also need to delete those files?
Is it "C:\Users\Administrator"? I think it's more than that.
 
Normally you will use a sysprep process to generalize the image before capturing it, to remove any user accounts. You can choose whether to keep any installed 3rd-party drivers that were loaded or discard them.

Enabled Unattended mode, and change these settings:

1719326288074.png

1. Install the ISO. After a while, Windows install will stop in Audit mode, and you can update the image manually. It's best to unplug the network cable (or disable networking) so Windows Update doesn't start the background process of updating installed apps.

1. Generalize the image to prepare for capture:
Code:
C:\Windows\System32\sysprep\sysprep.exe /generalize /shutdown /oobe

2. After Windows shuts down, boot from a clean ISO (with no Unattended file). Wait until the first screen and stop.
Open a CMD window with Shift-F10. Now capture the image:
Code:
Dism /Capture-Image /ImageFile:"D:\Images\install.wim" /CaptureDir:C:\ /Name:ServerImage

It's very important that after you generalize the image, not to boot from the installed Windows before capturing it.
Boot from a clean ISO or another disk. The captured WIM file can be used to replace install.wim on the ISO folder you're using.
 
Normally you will use a sysprep process to generalize the image before capturing it, to remove any user accounts. You can choose whether to keep any installed 3rd-party drivers that were loaded or discard them.

Enabled Unattended mode, and change these settings:

View attachment 12178

1. Install the ISO. After a while, Windows install will stop in Audit mode, and you can update the image manually. It's best to unplug the network cable (or disable networking) so Windows Update doesn't start the background process of updating installed apps.

1. Generalize the image to prepare for capture:
Code:
C:\Windows\System32\sysprep\sysprep.exe /generalize /shutdown /oobe

2. After Windows shuts down, boot from a clean ISO (with no Unattended file). Wait until the first screen and stop.
Open a CMD window with Shift-F10. Now capture the image:
Code:
Dism /Capture-Image /ImageFile:"D:\Images\install.wim" /CaptureDir:C:\ /Name:ServerImage

It's very important that after you generalize the image, not to boot from the installed Windows before capturing it.
Boot from a clean ISO or another disk. The captured WIM file can be used to replace install.wim on the ISO folder you're using.
Thank you for this Garlin. I have also one thing to ask, if you have any idea on how to prevent the increase of final install size when captured image is deployed to machines?
 
Not really, because the captured image represents the true disk size of Windows because the install process is almost over.

It could be cleaned up if you installed Windows updates during sysprep (but most users don't wait for sysprep, and add updates directly to the base image). But otherwise it's not "bloated", installation is nearly complete and Windows is as big as it will get after a clean install.

Obviously you can convert the capture image to ESD format to save space on the ISO or USB, but that doesn't save any disk space on the Windows volume on the deployed machines.
 
Back
Top