How To Image and Deploy Windows 7

advertisement
GO Software Pty Limited
Map: 27 Tacoma Blvd, Pasadena SA 5042
Phn: 0403-063-991
ABN: 54-008-044-906
Eml: support@gosoftware.com.au
Fax: none
ACN: 008-044-906
Web: www.gosoftware.com.au
How To Image and Deploy Windows 7 a Complete Guide - Using sysprep and imagex
http://benosullivan.co.uk/windows/how-to-image-and-deploy-windows-7-a-complete-guide/
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. To Sysprep Windows XP See SysPrep_XP.htm.
This negates the need for an image for each hardware configuration or the use of any third party software
This guide will show you how to create an image from scratch then prepare it for your domain using sysprep and then how to install
Windows 7 from this image using a USB memory stick, USB HDD or DVD.
1.
2.
3.
4.
5.
6.
7.
8.
Getting Ready
Create WINPE Disk
SYSPREP your machine (For Domains)
Capture the Image
Create new Install Media
Install using your new Install Media
Sample UnAttend.Xml
How to Boot Windows-7 Installation from a USB drive
Related Information
How to copy the default profile and setup for domains
How to install Windows 7 from a USB stick using XP
Generate an unattend.xml file for unattended installation
Getting Ready
1. Install Windows 7 from scratch on to your test machine. DO NOT upgrade from Windows XP, this needs to be a fresh
install.
2. Customise Windows 7 with any software, security settings or general settings you wish as when you install from this image all
the settings as well as user accounts will be installed by default.
3. Install WAIK for 7/2008 on the test PC which you can download from here (1.7GB).
Create WINPE Disk
1.
2.
3.
4.
5.
Right click command prompt and 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
6. 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
7. Run Command imagex.exe /unmount /commit c:\winpe\mount
8. Run Command copy c:\winpe\winpe.wim c:\winpe\iso\sources\boot.wim /y
9. Run Command oscdimg -n -h -bc:\winpe\etfsboot.com c:\winpe\iso c:\winpe\winpe.iso
(This will create an ISO in c:\winpe\winpe.iso).
10. Burn this and keep.
11. Now we need to sysprep our machine. (You can remove WAIK and any files you don't need, test your iso first!)
Sysprep Your Machine
1. change to the folder c:\windows\system32\sysprep\
2. run command
sysprep /generalize /oobe /shutdown
If you want to use run an unattended installation you can run the following command
sysprep /generalize /oobe /shutdown /unattend:sysprep.xml
(The unattend.xml will need to be in the sysprep folder). Check out the unattend.xml generator
Sysprep will remove any unique information and reseal the OS and then the system will shutdown and then now we boot the ISO we
created previously and load into WinPE.
Capture Image
Once WinPE is booted you will be in a Command Prompt window
1. Run Command diskpart
2. Run Command select disk 0
3. Run Command list volume and note the letter of the drive you are imaging.
C:\ in WinPE is set as the running OS (winPE) not as the internal HDD
4. Run Command exit
5. 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
If you didn't use the sysprep to include unattend.xml you can also add it directly to the root of the install media. You can easily
Generate an unattend.xml here
Install Windows 7 as normal.
Your changes will be installed along with Windows 7.
Sample UnAttend.Xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86"
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<SetupUILanguage><UILanguage>en-US</UILanguage></SetupUILanguage>
<InputLocale>0409:00000409</InputLocale>
<UserLocale>en-US</UserLocale>
<UILanguage>en-US</UILanguage>
<SystemLocale>en-US</SystemLocale>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="x86"
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<UserData>
<AcceptEula>true</AcceptEula>
<FullName>Glyn Roberts</FullName>
<Organization>GO Software</Organization>
<ProductKey>
<Key>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</Key>
<WillShowUI>Never</WillShowUI>
</ProductKey>
</UserData>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86"
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>2</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
</OOBE>
<TimeZone>Cen. Australia Standard Time</TimeZone>
<UserAccounts>
<AdministratorPassword>
<Value>T3ch1T3070</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount>
<Password>
<Value>T3ch1T3070</Value>
<PlainText>true</PlainText>
</Password>
<Description>Glyn Roberts</Description>
<DisplayName>Glyn Roberts</DisplayName>
<Group>Administrators;Users;PowerUsers;</Group>
<Name>GlynR</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
</component>
<component name="Microsoft-Windows-International-Core" processorArchitecture="x86"
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<InputLocale>0409:00000409</InputLocale>
<UserLocale>en-US</UserLocale>
<UILanguage>en-US</UILanguage>
<SystemLocale>en-US</SystemLocale>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86"
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<ComputerName>*</ComputerName>
<RegisteredOrganization>GO Software</RegisteredOrganization>
<RegisteredOwner>GO Software</RegisteredOwner>
<Display>
<ColorDepth>32</ColorDepth>
<HorizontalResolution>1024</HorizontalResolution>
<RefreshRate>60</RefreshRate>
<VerticalResolution>768</VerticalResolution>
</Display>
</component>
</settings>
</unattend>
Installing Windows 7 From a USB Stick From Windows XP (Bootable USB)
Installing Windows 7 onto a USB drive in Windows XP is harder than Windows Vista. This is because the "diskpart" tool that is used to
prepare the USB drive is different to Vista and 7.
You will need
1. Usb Drive of 4gb or more
2. Daemon tools (or other ISO emulator) (download Daemon Tools Lite (DTLite4402-0131.exe) from here
3. A Windows 7 install DVD or .ISO
USB Install Method
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Insert the USB Drive
Format the USB Drive with NTFS
Open a Command Windows (start->accessories->command prompt)
type in diskpart (download diskpart here)
type in list disk and find the ID of your USB disk
Next type in select disk 1 where 1 is the Disk ID
Next type in select partition 1
Finally type active (You will get a confirmation)
Mount the Windows 7 ISO with Daemon Tools (make note of drive letter it assigns)
Copy all files from the Windows 7 DVD to the USB Drive
Run the following command (Where D:\ is the Windows 7 DVD and E: is your USB Stick)
D:\boot\bootsect /nt60 E: /mbr
12. Set your PC to boot from USB and you're away!
If you don't have an option to format the USB drive using NTFS then
1.
2.
3.
4.
5.
6.
7.
8.
Plug in your USB stick
Open the Start Menu
then click Run
Type in devmgmt.msc or just open Device manager some other way
Find your USB Stick in Device Manager
Right Click your USB memory stick and Select Properties
Change to the Policies tab
change to Better Performance
You will now be able to format the drive in NTFS. Don't forget to change back before removal or you may lose data.
© Copyright 2014 by GO Software Pty Limited
Download