4
My WIM Cheat Sheet Sean K Anderson - SSCC IT Department Windows Image files can contain multiple images where each is accessed by a name or index number-- starting with number one. Appending an image does not duplicate files already in the WIM. So, when you create a WIM by capturing a basic image, each subsequent image appended will not capture OS files if they are already present in the first image. When building a reference image you should only work in the local Administrator account. If you create a user during OOBE you need to activate the Administrator account and delete the initial user account before proceeding. Do not join a domain. net user administrator /active:yes Required: Windows Automated Installation Kit (Installed on the technician’s PC) Apply Image: imagex /apply x:\windows7.wim 1 c: <<-- the 1 selects the first image in the wim List WIM Info: imagex /info x:\Windows7.wim <-- Use this cmd to find image names and indexes. Image Capture: [Only used on a sealed system --after sysprep.] imagex /capture /flags “Enterprise” c: x:\Windows7.wim “Image Name” Image Delete: imagex /delete x:\Windows7.wim 2 <-- Deletes the second images from this WIM Image Append: [Only used on a sealed system --after sysprep.] imagex /append /flags “Enterprise” c: x:\Windows7.wim “Image Name” BCD Store bcdedit /createstore c:\boot\bcd bcdedit /store c:\boot\bcd /create {bootmgr} /d "Windows Boot Manager"

My WIM Cheat Sheet

Embed Size (px)

Citation preview

Page 1: My WIM Cheat Sheet

My WIM Cheat SheetSean K Anderson - SSCC IT Department

Windows Image files can contain multiple images where each is accessed by a name or index number-- starting with number one. Appending an image does not duplicate files already in the WIM. So, when you create a WIM by capturing a basic image, each subsequent image appended will not capture OS files if they are already present in the first image. When building a reference image you should only work in the local Administrator account. If you create a user during OOBE you need to activate the Administrator account and delete the initial user account before proceeding. Do not join a domain. net user administrator /active:yes

Required: Windows Automated Installation Kit (Installed on the technician’s PC)

Apply Image: imagex /apply x:\windows7.wim 1 c: <<-- the 1 selects the first image in the wim

List WIM Info: imagex /info x:\Windows7.wim <-- Use this cmd to find image names and indexes.

Image Capture: [Only used on a sealed system --after sysprep.]imagex /capture /flags “Enterprise” c: x:\Windows7.wim “Image Name”

Image Delete:imagex /delete x:\Windows7.wim 2 <-- Deletes the second images from this WIM

Image Append: [Only used on a sealed system --after sysprep.]imagex /append /flags “Enterprise” c: x:\Windows7.wim “Image Name”

BCD Storebcdedit /createstore c:\boot\bcdbcdedit /store c:\boot\bcd /create {bootmgr} /d "Windows Boot Manager"

Page 2: My WIM Cheat Sheet

My Sysprep Cheat SheetSean K Anderson SSCC IT Department

Windows image files (WIMs) can contain multiple images where each is accessed by a name or index number-- starting with number one. Appending an image does not duplicate files already in the WIM. So, when you create a WIM by capturing a basic image, each subsequent image appended will not capture OS files if they are already present in the first image. When building a reference image you should only work in the local Administrator account. If you create a user during OOBE you need to activate the Administrator account and delete the initial user account before proceeding. Do not join a domain.

net user administrator /active:yes

Required: Windows Automated Installation Kit (Installed on the technician’s PC) Windows Installation DVD

When building WIM files you must be mindful that WIM manipulation can get messy. For instance, if you have a WIM that already contains images, and you wish to replace one, then you need to delete the one you want to replace before using “imagex /append.” You can’t delete the first image used to build a WIM. The command “imagex /capture” is only used for creating new WIM files, it cannot be used to add or replace an existing image within a WIM. Keep notes and be methodical or you will pay!

Preparing an answer file (unattend.xml)

Start Windows System Image Manager on the technician computer. Create a new answer file. You will be required to point to a install.wim found on the Windows 7 installation DVD.

The single entry that most people care about in the answer file is the copy profile setting. But there is another entry that is equally important-- SkipRearm. If this is not set properly you will work for hours only to be greeted by an error message during sysprep and a useless reference image--yay!

Copy Profile Pass Setting

Skip Rearm Pass Setting

Page 3: My WIM Cheat Sheet

There are literally thousands of settings available, but they are way beyond the scope of this paper. Get with your friendly WIM guru or search the internet for more information.

http://blog.brianleejackson.com/sysprep-a-windows-7-machine-%E2%80%93-start-to-finish-v2

Configure these pass settings and save the unattend.xml to a flash drive. Copy the unattend.xml to c:\Windows\System32\sysprep\ on the reference image computer.

When you think you are ready to capture the reference image for deployment, open an elevated command prompt on the reference computer.

cd c:\windows\system32\sysprepsysprep /oobe /shutdown /generalize /unattend:unattend.xml

When sysprep is finished, Windows will shut down and you are now ready to boot to your external Windows PE hard drive and capture the image!

Do not let Windows startup or you will need to run sysprep again. A basic image without software will take up about 3.5GB of space. A standard image loaded with basic software will usually consume about 5.5GB. Watch the size of the WIM, if it goes above these sizes then you probably left some extra files on the drive while you were building the image.

Security NoteWhen you get to the point of enabling the administrator account and setting it to auto logon (in the unattend.xml) you must also configure and run a script at install (oobe) that will delete the unattend.xml from the two locations it is found on the deployed image. Do not leave the unattend.xml sitting on the machine when you deploy it; this file stores local administrator logon credentials!

Windows PE Steps [Bootable Flash Drive/External Hard Drive]Prepare WinPE Stuff on your PC

1. Open Deployment Tools Command Prompt2. copype.cmd x86 c:\WinPEx86 (replace x86 with amd64 for 64bit)3. copy c:\WinPEx86\winpe.wim c:\WinPEx86\iso\sources\boot.wim4. copy c:\program files\Windows AIK\Tools\x86\imagex.exe c:\WinPEx86\

iso\Prepare the external hard drive (X:\)

1. diskpart2. list disk3. select disk #4. clean5. create partition primary6. select partition 17. active8. format quick FS=NTFS9. assign

Make the boot disk [X: is the drive letter of the external]1. xcopy c:\WinPEx86\iso\*.* /e x:\

You can now place any other files you need on the bootable hard drive. I would start with the WIM file you are going to deploy! You can use imagex.exe to apply, capture, view, and modify WIM files.