How To Image and Deploy Windows 7 a Complete Guide – Using sysprep and imagex
Starting with Windows Vista and continuing into Windows 7. Is the ability to image a machine and to have the Windows installer use that image to install Windows. This negates the need for an image for each hardware configuration.
This guide will show you how to create and image from scratch and how to install from this image.
Index
Getting Ready
Create WINPE Disk
SYSPREP your machine (For Domains)
Capture the Image
Create new Install Media
Getting Ready
- Install Windows 7 from scratch on to your test machine.
- Customise Windows 7 with any software, security settings or general settings you wish. When you install from this image all the settings as well as user accounts will be installed by default.
- Install WAIK for 7/2008 on the test PC. Download from here.
Create WINPE Disk
- Right click command prompt run as admin
- Change to directory “C:\Program Files\Windows AIK\Tools\PETools”
- run command “copype x86 c:\winpe”
- run command “imagex /mountrw c:\winpe\winpe.wim 1 c:\winpe\mount”
- copy imagex.exe from “C:\Program Files\Windows AIK\Tools\x86\imagex.exe” to “c:\winpe\mount\windows\system32″
- Create wimscript.ini in “c:\winpe\mount\windows\system32″ with following inside
[ExclusionList]
ntfs.log
hiberfil.sys
pagefile.sys
"System Volume Information"
RECYCLER
Windows\CSC
[CompressionExclusionList]
*.mp3
*.zip
*.cab
\WINDOWS\inf\*.pnf
- Run Command “copy c:\winpe\winpe.wim c:\winpe\iso\sources\boot.wim /y”
- Run Command “oscdimg -n -h -bc:\winpe\etfsboot.com c:\winpe\iso c:\winpe\winpe.iso”
- This will create and ISO in c:\winpe\winpe.iso.
Burn this and keep. Now we need to sysprep our machine.
Sysprep Your Machine
- change to the folder “c:\windows\system32\sysprep\”
- run command “sysprep /generalize /oobe /shutdown”
- Sysprep will remove any unique information and reseal the OS. Then the system will shutdown
- Now boot the ISO we created previously and load into WinPE
Capture Image
- Once WinPE is booted you will be in a Command Prompt window
- Run Command “diskpart”
- Run Command “select disk 0″
- Run Command “list volume”
- Note the letter of the drive you are imaging. C:\ in WinPE is set as the running OS not as the internal HDD
- Run Command “exit”
- Run Command “imagex /capture d:\ d:\install.wim “My Windows partition”" where d:\ is the drive you are copying
- This will create a file called install.wim in the root of your HDD. This is the custom image and will need to be added to the Windows 7 Install DVD
Create Installation Media
- You will probably need to install from USB as the image will probably be to large for a DVD. Here is a guide for Windows 7 USB Install
- overwrite install.wim to \sources on the windows 7 install source
Let me know if this helped you! Leave a comment.


Following directions to create win 7 image and all works except at last part:
imagex /capture d:\ d:\install.wim “my windows partition”
I’ve replaced “my windows partition” with c but get error
file/folder excluded from file capture by default and error opening d:\install.wim
“my windows partition” is just a name to call the image. if the drive you need to image is c:| “it probably isn’t as the sysprep cd is c:\” then the command is:
imagex /capture C:\ C:\install.wim “my windows partition”
You can read more on this command here:
http://technet.microsoft.com/en-us/library/cc749003%28WS.10%29.aspx
When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get four emails with the same comment. Is there any way you can remove me from that service?Thanks
There are no subscribers to this post.
I guess you removed it yourself.
If not please email me your email address contact[at]benosullivan.co.uk
Hey and thanks for your guide.
I havent worked with images since winXp, and Ive been using ghost.
Does win7 have the same limitations with cores etc. that casued me to have a new image for every machine type I have. Or can this win7 based image install on all (suitable – driversupported) machines?
Thanks
Karsten
As the image is pre-install, you can install it on any hardware like a basic version of Windows 7.
There are no problems with the SID of the computer or any problems with one for each type of hardware.
I use it at my work and we have one image for our PCs and one for the Laptops (Just because of different software requirements) They are very hardware diverse
Hello
I tried this but got 1 error, first when I run this command: imagex.exe /unmount /commit c:\winpe\mount and afterwards I don’t understand the last task, overwrite install.wim to \sources on the windows 7 source.
I’d appreciate if you could fill in some “gaps” that are to big jumps for me as I don’t work with these things..
On the install DVD there is an install.wim file.
This needs to be replaced with the custom version by either burning a new DVD or installing from USB
Im sorry but I just don’t understand, I have the install.wim on C:\, what do I do after that, what DVD are you refering to?
When I try Sysprep i don’t get a screen where I can put in my Windows 7 Product Key… It’s like it doesn’t reseal the OS.
Hi again, I managed with Sysprep, it was probably something with the HP installation, I tried e fresh Win 7 inst. at it worked with Sysprep.
I took a backup image with Acronis and booted with a Acronis Universal Restore CD and Recovered with the Image i took, think it’s much more easier than all of the commands and programs since we’re going to use the Acronis software anyway..