THIS IS OLD, PLEASE SEE NEW VERSION 2, CLICK HERE
This is a step by step guide on Sysprepping (and yes, I have made sysprepping a verb now) a Windows 7 machine from start to finish. This will guide you through building the unattended XML file, having the administrator profile copy over to default profile, and fixes for what is right now a not 100% working system from Microsoft. This is something I would have easily paid for when first starting this process. I don’t know why Microsoft can’t hand us a 100% working process. There will always be fixes, even with the RTM release.
Here is a list of what you will need:
- Latest version of WAIK : KB3AIK_EN.iso Version 1.0
- Windows Vista or Windows 7 Machine to build the XML file on
- ISO or DVD of Windows 7 Installation (x32 or x64)
- WinPE Boot Environment : BrianLeeJackson WinPE 3.0 BootLoader
Once you have WAIK installed on a machine your Start Menu should look like the image below:
Go ahead and launch the Windows System Image Manager. Picture of the program is below.
We now need to open a Windows 7 image. If you have an installation DVD, insert it now. Or if you have an ISO of 7, go ahead and extract it to a folder on your desktop. (I recommend 7-zip). Back in Windows System Image Manager (WISM) go to the file menu and select “Select Windows Image”. You will now want to browse to the .CLG file in your Windows 7 installation (I am using Windows 7 Enterprise x64 in my example). It is located in the sources folder. See Image below.
Now we need to create a new answer file. Go to the file menu and select “Create New Answer File.” Right after creating one, go ahead and simply go to file menu and select “Save Answer File.” This will give your XML file a name and save location. Now you see we have two category folders, Components and Packages. Under the Components folder you see that we have 7 options:
- 1 windowsPE
- 2 offlineServicing
- 3 generalize
- 4 specialize
- 5 auditSystem
- 6 auditUser
- 7 oobeSystem
These are very important as these are the steps in which the XML file is sequenced.
The next part is a little confusing. You are going to add components, from under the “Windows Image” section on the bottom left hand side to the passes on your Answer File. To add a component, you can right click on them and select “add to # pass”. There are many different options you can add, but they have to be done in a certain order and pass otherwise your sysprep might fail. I am simply going to use the one I created as the example.
Download my Windows 7 x86 Sysprep XML File
Download my Windows 7 x64 Sysprep XML File
Here is more information about adding options under the passes:
1 WindowsPE
Nothing required in my example.
2 OfflineServicing
Nothing required in my example.
3 Generalize
amd64_Microsoft-Windows-Security-SPP_neutral
Set 1 for SkipRearm to allow up to 8 rearms
4 Specialize
amd64_Microsoft-Windows-Security-SPP-UX_neutral
SkipAutoActivation: true
amd64_Microsoft-Windows-Shell-Setup_neutral
Computer Name: * (Randomly generated name, use this to test)
CopyProfile: false (doesn’t quite work, we will do that manually later)
Registered Organization: Microsoft (you must leave this in this section)
Registered Owner: AutoBVT (you must leave this in this section)
ShowWindowsLive: false
TimeZone: Pacific Standard Time
5 AuditSystem
Nothing required in my example.
6 AuditUser
Nothing required in my example.
7 OobeSystem
amd64_Microsoft-Windows-International-Core_neutral
InputLocale: en-us
SystemLocale: en-us
UILanguage: en-us
UserLocale: en-us
amd64_Microsoft-Windows-Shell-Setup_neutral
RegisteredOrganization: YourCompanyName
RegisteredOwner: YourName
Under amd64_Microsoft-Windows-Shell-Setup_neutral component, you will have a subheader for OOBE:
HideEULAPage true
NetworkLocation: Home
ProtectYourPC: 1
Under amd64_Microsoft-Windows-Shell-Setup_neutral component, you will have a subheader for UserAccounts:
You will want to add both an administrator password and another local account with administrator rights and password.
If you have questions, look at my image above to see full layout of components, it should help. Also, you might have additional component headings that I didn’t mention. If you are simply testing first time, just delete them for now. You can add all sorts of components later on, you should do a successful sysprep if this is your first time, better to keep it simple and to the basics.
K, now go ahead and save your answer file. The building of the XML file is now done. That is the worst part. You would think that the sysprep process would get easier as new OS’s come out, but its pretty much the exact opposite.
Prepping your machine
K, now it is time to get your machine that you want to sysprep and capture an image of ready to go. First, you are going enable the administrator account on the computer. To do this on Windows Vista or Windows 7, open up a command prompt (Run as Administrator) and input the following command:
net user administrator /active:yes
Hit enter and you should see “successfully enabled Administrator Account”.
So you should currently have two accounts on your computer. The account you are currently logged into and the Administrator account which you just enabled. You are going to want to customize all of your preferences, favorites, bookmarks, taskbar, etc. under the currently logged in account. Once you have everything just perfect, you are going to reboot the computer and login to the administrator account. This next part is very important. You are going to go to “My Computer” and then to Organize and folder and search options. Go ahead and select “Show hidden files, folders, and drives”. Picture is below.

Show Hidden Files, Folders, and Drives
No go to “My Computer” and you are going to rename the Default folder to Default.bak (The CopyProfile setting in Sysprep on Windows7 does not seem to work yet). Next, copy your other user account, the one you customized everything in, right click on it and select copy. Then paste within that same window. It is going to come out as USERNAME – COPY. Now rename this copied folder to Default. Now after you sysprep your computer it will create all new accounts from that default profile folder using all your customized options.
The last thing we need to do is disable the WMP sharing service. This is a bug in Windows 7 and hopefully will eventually be fixed. If you don’t disable this before the sysprep your sysprep will simply fail to run. Go to run, msconfig, and then disable the “Windows Media Player Networking Sharing” service.
Now you are ready to sysprep your computer and capture an image of it!! Finally! So, grab that XML file you created earlier and you are going to place it on the machine you built your image on. Copy or move it to : C:windowssystem32sysprep.
Now to run sysprep, navigate to that sysprep folder, hold SHIFT and right click and select “Open New Command Windows Here”.
Next, input the following commands:
sysprep /generalize /oobe /shutdown /unattend:NAMEOFYOURANSWERFILE.xml
Your computer will now run the sysprep process, removing SID, etc, and then shutdown. You can have it restart, but shutdown is always safer if you have a ton of things going on. You will need to boot to your WinPE Boot environment when your computer starts back up. If you miss the first time upon boot up, you will have to re-input your sysprep commands. So do a shutdown, not a restart.
You can use my BrianLeeJackson WinPE3.0 BootLoader to boot up from USB or CD and capture your image. Once you capture your image, you are all done. You now have a sysprepped Windows 7 image. I have performed this task on over 120 computers so far and it has been flawless. The hard part was getting everything configured correctly. I hope this documentation helps someone out there, I know I would have killed for a tutorial like this when I first started






Pingback: Where can I find a beginner’s guide to using sysprep for deploying Windows 7? Drija
Pingback: Where can I find a beginner’s guide to using sysprep for deploying Windows 7? - Admins Goodies