System Preparation Tool - Use to Customize Windows


How to Use Sysprep to Customize Windows 7 and Windows 8

   Information
This tutorial is a short introduction to the wonderful world of Sysprep :).

The built-in Windows System Preparation Tool, Sysprep to put it short, is a tool not very well known outside the geek circles although it is quite easy and simple to use. Alone it can do quite little, basically only two tasks: boot Windows to a so called Audit Mode, and generalize your Windows setup by removing all hardware independent information and drivers to allow the Windows image be transfered to another computer.

Add an Answer File and everything is possible! An Unattended Answer File is an XML script containing settings information to be used during Windows Setup. You can for instance put the product key, your selected username and other such information in answer file, run it with Sysprep and capture the image created. Now when you want to install Windows on a new computer, you can use this image and let Windows install itself completely unattended, without it stopping to ask user information. This is why we call it Unattended Answer File.

Honestly, this will be a long and boring tutorial. I will try to show you how Sysprep works with a few simple self-explanatory examples. It would be impossible to explain sysprepping with an answer file with a few words.

Anyway, don't let funny words and strange acronyms fool you, sysprepping is quite easy as you will see.

This tutorial applies to both Windows 7 and Windows 8.

Kari

   Warning
Notice that as an upgraded Windows cannot be sysprepped and as a so called repair install is also considered as an upgrade (in-place upgrade to same edition), you cannot sysprep an existing Windows installation as shown in Part 3 of this tutorial if your Windows is either in-place upgraded from an earlier version, or if you have done an Anytime Upgrade from a minor edition of same Windows version, or if you have done a repair installation.

When sysprepping an existing Windows setup, it only works if the Windows was installed clean and has never been upgraded or repaired using repair install.

If you have Internet Explorer 10 installed on a Windows 7 system, please read this first: Sysprep Fatal Error With IE 10 (FIX) | System Administration

IE10 has no issues on Windows 8 with sysprep.


If you get easily bored when reading background information you can jump into action in Part 2. If you decide to get into boredom instead and read the whole tutorial, keep in mind that although this might sound complicated and there are so many strange and comical words, at the end sysprepping really is no rocket science ;).


First a few words good to know before proceeding:
  • Sysprep
    • (Noun) Commonly used short name for Windows System Preparation Tool
  • To sysprep
    • (Verb) prepare (customize) a new Windows Image or existing Windows setup using Sysprep tool
  • Answer File
    • A settings file written in XML containing instructions for Sysprep
  • Audit Mode
    • A special mode of Windows (compare to normal and Safe Mode) to allow preparing a Windows image with user customizations and modifications
  • Welcome (OOBE) Mode
    • A special mode of Windows, normally run only once after installation, first boot after installation is finished. Initial User Account is created, PC named, network location and time zone set during OOBE boot
  • OOBE
    • Out-of-Box Experience, first boot after installation, welcoming user
  • Windows PE
    • Windows Preinstallation Environment, a reduced and very limited "mini operating system" to be used to prepare a computer for Windows installation. PE images can be used for computer rescue and much more but usually a normal user has ever seen only one version of PE, the one which starts when you boot with Windows installation DVD and asks you if you want to start Windows installation and accept the license terms. The installation runs on Windows PE until first reboot during installation



Part 1:

Sysprep Basics


1.1. Answer File

Sysprep works with Unattended Answer Files, without an answer file it can only those two simple tasks mentioned in Introduction above. When you sysprep you tell the system that the settings you will change and tasks you want Sysprep to do are listed in an answer file. The answer file consists of two different sections, Components and Packages.

Answer File Components Section

The components section of an answer file has one or more from a total of 7 different groups or as they are called Configuration Passes. Each Configuration Pass contains information for different parts of Windows system and setup.

Table here below shows name of the Configuration Pass on left column and description on right.

windowsPE | Configures Windows PE options and basic Windows Setup options. These options can include setting the product key and configuring a disk.
offlineServicing | Applies updates to a Windows image. Also applies packages, including software fixes, language packs, and other security updates. During this pass, you can add drivers to a Windows image before that image is installed and processes out-of-box device drivers during Windows Setup.
specialize | Creates and applies system-specific information. For example, you can configure network settings, international settings, and domain information.
generalize | Enables you to minimally configure the sysprep /generalize command, as well as configure other Windows settings that must persist on your reference image. The sysprep /generalize command removes system-specific information. For example, the unique security ID (SID) and other hardware-specific settings are removed from the image. The generalize pass runs only if you run the sysprep /generalize command.
auditSystem | Processes unattended Setup settings while Windows is running in system context, before a user logs onto the computer in Audit mode. The auditSystem pass runs only if you boot to Audit mode.
auditUser | Processes unattended Setup settings after a user logs onto the computer in Audit mode. The auditUser pass runs only if you boot to Audit mode.
oobeSystem | Applies settings to Windows before Windows Welcome (OOBE) starts.
(Table source: How Configuration Passes Work)

Answer File Packages Section

The most important of all Windows distribution packages is the Windows Foundation Package which is included in all Windows installation medias by default and includes all basic Windows features like Media Player, games, gadgets (Vista & 7) and so on.

Using Sysprep you can add various packages to your Windows image. Language Packs, Service Packs, Windows and third party updates and so on. These packages will be added to answer file's Packages section.

Answer files are created with Windows System Image Manager.

1.2. Sysprep usage

Sysprep can be used from command line (command prompt) or with graphical user interface. The GUI is very limited only allowing user to boot to Audit Mode, Welcome (OOBE) Mode and generalize the Windows setup by removing all hardware related information and drivers to allow Windows image to be moved or deployed to different hardware setup.

Sysprep GUI:
SystemPreparationTool3.14.png
You can run it by typing %windir%\system32\sysprep\sysprep.exe to Run dialog (Win + R), or by browsing to folder C:\Windows\system32\sysprep\ and double clicking Sysprep icon. Be careful, though; if you do not want to do a Welcome (OOBE) boot as if the PC and Windows were totally new, close that dialog by clicking Cancel. Once you click OK there's no way to interrupt Sysprep.

Command line usage lets you use more options. To see the usage of sysprep command, type %windir%\system32\sysprep\sysprep /? to command prompt or Run dialog:
SystemPreparationTool3.14_2.png
Be sure to close all open applications including browser windows before running Sysprep! Do not launch any applications or processes while Sysprep is running.

   Tip
Sysprep really hates sharing ;). The single most common reason for Sysprep errors after typos in answer file is that user has Windows Media Player Network Sharing Service (WMPNetworkSvc) running causing a fatal error when sysprepping. To be sure this Windows service does not interfere with your sysprepping, stop the service before running the Sysprep command. You can stop it by typing net stop WMPNetworkSvc to command prompt and hitting Enter.




Part 2:

Sysprep Windows Image during installation


2.1. Install Windows

Install Windows (clean, fresh install) using valid original install media. If needed consult respective tutorial for installation help and tips:
2.2. Enter Audit Mode

When installation after last reboot stops for user and computer name (Win 7) or Personalize page (Win 8), do not enter any information and do not click Next! We will now interrupt the last phase of Windows installation (Welcome (OOBE) boot) and reboot to Audit Mode. When we have sysprepped the image, installation automatically continues from here

Press CTRL + SHIFT + F3 when you see this window to reboot Windows to Audit Mode:

Windows 7
EnterAuditMode_Win7.png
Windows 8
EnterAuditMode_Win8.png
(Click to enlarge images.)
   Note
If you have got a new PC with pre-installed Windows, enter Audit Mode as told above when you see the respective Enter User and Computer Name or Personalize screens during the first time boot.

Windows reboots now and enters Audit Mode. As no user profiles are yet created it uses the built-in administrator account.

On Windows 7 you will see an empty desktop, Sysprep GUI in the middle of it. On Windows 8 you need to click the Desktop tile on Start Screen to enter desktop.

Before anything else close the Sysprep GUI by clicking Cancel:
SystemPreparationTool3.14_3.png
2.3. Install Windows System Image Manager

To create your first answer file you will need Windows System Image Manager (Windows SIM or simply SIM). Windows SIM is part of the Windows Automated Installation Kit (AIK) for Windows 7, and part of the Windows Assessment and Deployment Kit (ADK) for Windows 8.

Download respective AIK or ADK. You can use Internet totally normally in Audit Mode. Use the native built-in Internet Explorer for this download, do not install any third party browsers yet:
Of course you could have downloaded AIK or ADK already before you started the installation using another PC and now simply transfer the downloaded files to your new installation.

You can install AIK or ADK on any Windows computer to create answer files, it don't have to be done with the computer you are sysprepping. Install AIK on PC1, prepare an answer file, save it to a USB stick and use when sysprepping PC2.

Windows 7 AIK is an ISO file. Burn it to a CD or USB and run setup application. Alternatively you can download and install a virtual drive application and mount the image on a virtual CD drive.

Windows 8 ADK is an executable install package, simply run it to start installation.

2.3.1. Install on Windows 7

If the autorun does not automatically run the setup launch it manually by double clicking the executable StartCD.exe on the WAIK CD.

Click Windows AIK Setup:
7AIK_1.png
Accept all default settings, install WAIK. After installation you will find Windows SIM in Start Menu:
7AIK_2.png
2.3.2. Install on Windows 8

Run the downloaded ADK executable file. Click Install accepting default setup settings:
8ADK_1.png
After installation you will find Windows SIM tile on Start Screen:
8ADK_2.png
2.4. Create an Answer File

Open the File Menu in SIM, select New Answer File:
7AIK_3.png
Click Yes to open a Windows Image to be sysprepped:
7AIK_4.png
Browse to your Windows install media (DVD or USB), open the folder Source and select the file install.wim. Click Open:
7AIK_5.png
Select the correct Windows edition according to the one you have installed:
7AIK_6.png
-- OR --
8ADK_3.png

   Note
I will use Windows 7 Ultimate in this tutorial. I will create an image which does the following changes during Windows installation to various settings and variables:
  • Relocates the Main User Profile folder and all future user accounts including all user specific files and folders to drive D: from default location C:\Users to save space on system drive
  • Modifies the Default User Profile so that all accounts when created have desktop settings as I want to have them
  • Names the PC
  • Creates my personal user account
  • Enters the product key
To learn Sysprep you do not have to do all the changes and customizations I will do, the main thing is for you to understand how these changes are made. You can also do your own modifications. Answer file components used in Windows SIM are quite logically named so you will have no problems in finding some interesting stuff by yourself.

If I leave the product key out of the answer file, I could also use this image to install Windows 7 Ultimate on to any and as many computers I'd like to with my user account already created, computer named, Default User Profile for all new user accounts set as I want to. However, for this tutorial I am creating this image only to be used on this Windows setup we interrupted in 2.2. to enter Audit mode, therefore I can automate the product key input.

This, deployment of hardware independent tailor-made Windows image is the main purpose of Sysprep, Windows SIM and AIK / ADK. It makes the IT department's job easier in company environment where they install identical images (Windows setups) to various hardware. This, however, is no reason for a normal user not to use the same method; even though created and meant for business use, the same tools can make an individual user's computing easier.


After you have created a new empty answer file you will see this:
WSIM_1.png

  1. A list of Components and Packages for your selected Windows version and edition
  2. Content of the answer file, still empty
  3. Properties of selected answer file content
  4. System messages
Click the + sign to open the Components list on Windows Image pane (#1. in screenshot above). We will start from the component group Microsoft Windows Shell Setup, most of the settings I wanted to modify can be found from this group.

Let's work in that order I listed my chosen modifications above. Click the + sign to open Microsoft Windows Shell Setup component group, right click FolderLocations:
WSIM_04.png
You remember the table of different Component Passes earlier in this tutorial? As it explains, the oobeSystem pass is the one which will be done when Windows is started first time after installation. Logical place to change system variables is here, before the user gets control, so the pass 7 oobeSystem is only selectable here, all others being grayed out.

I select Add Setting to Pass 7 oobeSystem. Now the Answer File pane got its first content. As Microsoft does not recommend relocating other system folders than Users and ProgramData I will see those two folders here. Users folder is where all future user accounts will be stored, and ProgramData folder contains application settings for all users. As the Users folder can take a lot of space I want it located away from the system drive C:, so let's change the value (location) here. Default is C:\Users, I want to have D:\Users.
WSIM_05.png
To edit or add a value first right click the component in Components list in Windows Image pane, select correct pass from context menu (for this component we selected Pass 7 oobeSystem), click the component name in Answer File pane, in this case FolderLOcations, click the subcomponent ProfilesDirectory in Properties pane and enter the value, in this case now D:\Users.

Next on my list of modifications is to copy Default User Profile settings. The Default User Profile in Windows is a reference profile; when a new user account is created it gets settings like desktop background and settings, IE favorites and home page, theme and default program shortcuts from this profile.

After we have created the answer file, we can modify the desktop and other settings while still in Audit Mode. These modifications will then be copied to Default User Profile when we finally sysprep.

To do this, we need to go back upwards a bit on components list and select the the main component Microsoft Windows Shell Setup, right click it and select Add Setting to pass 4 specialize. As you can see the Properties pane is now showing variable CopyProfile among othe things. This is the variable we need to set to True to copy our personalization settings to Default User Profile. As this variable only has two possible values, True and False (default), we do not have to type anything. Simply click the variable and select correct value from drop down list. We want it to be True:
WSIM_06.png
   Note
Do not panic! There are literally hundreds of components and settings, you do not have to remember where each of them are and which component pass it belongs. The nice thing with Windows SIM and answer files is that you can keep trying and practicing. An answer file does nothing if it is not used in sysprepping so you can create as many practice answer files as you need to.

Keep clicking those components selecting different passes to see which values can be changed. Searching Internet for a component name usually gives you enough information to see what that component is for. Read this article to get to know the most important components: Walkthrough: Build a Simple Answer File

   Tip
If you are familiar with virtualization it is a good idea to create a virtual machine to be used as a sandbox. Create the vm, install Windows as described in 2.1. above, enter Audit Mode (2.2) and install Windows SIM (2.3). Now shut down the vm and create a snapshot (image).

Run the VM and create your first answer file. Sysprep using your answer file, see how it works. Restore the snapshot and create a new answer file to test.

The same can of course also be done with an extra PC if you have one lying around. Instead of a snapshot as when using virtual machine, create a system image after installing Windows Sim to be able to restore system when needed and start playing!

OK, let's move on. The next change on my list is giving the PC a name. Luckily it can also be found on Microsoft Windows Shell Setup as above the Default Profile, using the same pass 4 specialize so the only thing I need to do now is to click ComputerName variable in Properties pane and type the name for my PC. I also set Registered Organization and Registered Owner values as they are very practically also available here:
WSIM_07.png
Next my personal main user account, next item on my wishlist. We are still staying in main component group Microsoft Windows Shell Setup, this time we will need component UserAccounts > LocalAccounts > LocalAccount:
WSIM_09.png
That's done! Username Kari belonging to Administrators group. I also set password although it's blurred in this screenshot:
WSIM_08.png
Last item on my wishlist is the Product Key. It belongs to Microsoft Windows Setup main component group. Open the main group, right click UserData > ProductKey component and select Add Setting to pass 1 windowsPE. Set the key:
WSIM_10.png
We are almost there. Now the automatic acceptance of End User License Agreement, EULA. Just one step upwards where we were above with Product Key, the EULA acceptance can be found in Microsoft Windows Setup > UserData. As the Product Key it belongs to pass 1 windowsPE, too. Set value to True
WSIM_11.png
Below tip shows how to partition your hard disks with Sysprep. If at this point you would rather continue with our project, skip it and jump to 2.5. to validate your answer file.

   Tip
As we are now preparing our partly installed Windows to be sysprepped, main core of Windows is already installed on C:. For this Windows setup it is not a good idea to change disk and partition information with Sysprep, for this setup modifiying partitions should be done with Windows Disk Manager.

However, if we were now creating a general Windows image to be deployed, used in installing Windows to other computers, we could also automatize the partitioning of the hard disk or disks. To give you an example how easy it is, here below you can see what would be needed to automatically partition a system with two 500GB hard disks creating a 250GB partition C: for system with name OS and a 250GB partition D: for user profiles named as UserProfiles, both these partition on first hard disk, and then use the second hd completely for one partition called Data and giving it a drive letter X:.

All partitioning components can be found in component group Microsoft Windows Setup > DiskConfiguration. We need one component for creating each partition and one component to modify each partition as follows (all settings in Pass 1 windowsPE):

Hard disk numbers start from 0, partition numbers from 1 therefore in this example C: = Disk 0 Partition 1, D: = Disk 0 Partition 2 and X: = Disk 1 Partition 1. Remembering this I need to browse to component group Microsoft-Windows-Setup > DiskConfiguration and start configuring. (Remember: all following components to Pass 1 windowsPE!)

First we create two disks and wipe them to be able to start from empty disks, Microsoft-Windows-Setup > DiskConfiguration > Disk, values to Pass 1 windowsPE
  • DiskID = 0
  • WillWipeDisk = true (this will erase the hard disk so partitions are created on an empty disk)
And the same for second hard disk:
  • DiskID = 1
  • WillWipeDisk = true
Next we create first partition on first disk. Component Microsoft-Windows-Setup > DiskConfiguration > Disk > CreatePartitions > CreatePartition, values to Pass 1 windowsPE
  • Extend = false
  • Order = 1
  • Size = 250000 (size in Megabytes)
  • Type = Primary
And second partition, component Microsoft-Windows-Setup > DiskConfiguration > Disk > CreatePartitions > CreatePartition, values to Pass 1 windowsPE
  • Extend = false
  • Order = 2
  • Size = 250000
  • Type = Primary
Finally the third, Data partition, first partition on second disk. Component Microsoft-Windows-Setup > DiskConfiguration > Disk > CreatePartitions > CreatePartition, values to Pass 1 windowsPE
  • Extend = false
  • Order = 1 (first partition of second HD)
  • Size = 500000
  • Type = Primary
Now we need to edit those three raw partitions. First C:

Microsoft-Windows-Setup > DiskConfiguration > Disk > ModifyPartitions > ModifyPartition, values to Pass 1 windowsPE:
  • Active = true
  • Extend = false
  • Format = NTFS
  • Label = OS (any name you want to give to your system partition)
  • Letter = C
  • Order = 1
  • PartitionID = 1
The D: partition:

Microsoft-Windows-Setup > DiskConfiguration > Disk > ModifyPartitions > ModifyPartition, values to Pass 1 windowsPE:
  • Active = false (only one partition can be active)
  • Extend = false
  • Format = NTFS
  • Label = UserProfiles (any name you want to)
  • Letter = D
  • Order = 2
  • PartitionID = 2
Last but not least the data partition X:

Microsoft-Windows-Setup > DiskConfiguration > Disk > ModifyPartitions > ModifyPartition, values to Pass 1 windowsPE:
  • Active = false
  • Extend = false
  • Format = NTFS
  • Label = Data
  • Letter = X
  • Order = 1
  • PartitionID = 1
WSIM_29.png
These components with correct values would then create our two disk three partition system when Windows would be installed using our sysprepped image.


2.5. Review and Validate your Answer File

Time to check we didn't forget something. The Answer File pane shows your content, small + sign in the component box before its name tells that component has modified (non-default) values:
WSIM_18.png
When you are satisfied, you need to validate the answer file. Select Validate Answer File in Tools menu:
WSIM_19.png
If validation finds errors it shows them on Messages pane. Check the components that produced error messages and try to fix errors. In our case now everything seems OK:
WSIM_21.png


Now save the answer file, name it as you wish. Extension must be xml. The file can of course be saved anywhere you want to but when used with Sysprep it must be on root of a removable media, USB, CD, floppy or such.
WSIM_22.png
I save this answer file as MyAnswerFile.xml on a USB Flash Stick, drive F:.

I am used to do one extra check at this point: I open the answer file from where I saved it with IE and read it through to see if my eyes can catch a typo. You can open XML files with IE and open & edit with Notepad if you want to see results of your hard work yourself. If not, here's an example, the answer file we created together:

Code:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <FolderLocations>
                <ProfilesDirectory>D:\Users</ProfilesDirectory>
            </FolderLocations>
            <UserAccounts>
                <LocalAccounts>
                    <LocalAccount wcm:action="add">
                        <Password>
                            <Value>VABpAHQAeQBzAG8AZgB0ADEAUABhAHMAcwB3AG8AcgBkAA==</Value>
                            <PlainText>false</PlainText>
                        </Password>
                        <Description>Kari&apos;s account</Description>
                        <DisplayName>Kari</DisplayName>
                        <Group>Administrators</Group>
                        <Name>Kari</Name>
                    </LocalAccount>
                </LocalAccounts>
            </UserAccounts>
        </component>
    </settings>
    <settings pass="specialize">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <CopyProfile>true</CopyProfile>
            <ComputerName>TestPC02</ComputerName>
            <RegisteredOrganization>Sevenforums.com</RegisteredOrganization>
            <RegisteredOwner>Kari</RegisteredOwner>
        </component>
    </settings>
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <UserData>
                <AcceptEula>true</AcceptEula>
                <FullName>Kari The Finn</FullName>
                <Organization>SevenForums.com</Organization>
            </UserData>
        </component>
        <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <SetupUILanguage>
                <UILanguage>en-US</UILanguage>
            </SetupUILanguage>
            <InputLocale>fi-FI</InputLocale>
            <UILanguage>en-US</UILanguage>
            <SystemLocale>en-US</SystemLocale>
            <UserLocale>en-US</UserLocale>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:x:/sources/install.wim#Windows 7 ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

Before proceeding I need to create a partition D: using Disk Management (see tutorial); as you remember I changed the value of the component ProfilesDirectory to a yet non-existing partition D:. Creating it now will save me a lot of problems, sysprepping would have stopped for an error if it hadn't found the partition needed.

I also change some desktop settings like wallpaper and theme, create shortcuts and install a few gadgets, also I will set IE home page to Seven Forums and save Windows 8 Forums to Favorites. All these modifications will be copied to Default User Profile with CopyProfile component we used above so each and every user account that will be created on this Windows will have the wallpaper, icons and shortcuts, gadgets, home page and favorites as I want to have them.


2.6. Sysprep Windows using your Answer File

Time to do something with our Answer File, put it in action. Close all open applications and browsers and open command prompt.

First let's jump to Sysprep folder which is a subfolder of System32 in C:\Windows. Type following to command prompt and hit Enter:
Code:
CD C:\Windows\System32\Sysprep

Now the sysprep command. Sysprep get's the instructions from various switches. In this case we need four switches to tell Sysprep what to do:
  • Generalize
    • The CopyProfile component we used does not work without generalizing, removing all hardware related information. This is not a problem for us, our Windows is freshly installed and hardware specific drivers will first be installed when we do the OOBE boot
  • OOBE
    • This switch tells Sysprep to prepare computer for a Welcome (OOBE) mode boot i.e. first time boot. The other alternative here is Audit, to boot to Audit Mode but as we are finishing here and want to continue installing Windows, OOBE is our choice
  • Reboot
    • We ask Sysprep to reboot after it has finished. Other alternatives here are Shutdown which is practical if you want to sysprep then capture the image to be moved to another computer, and Quit, asking Sysprep to keep Windows on and stay in Audit Mode after sysprepping
  • Unattend
    • This switch tells Sysprep we want to use an answer file. To tell which answer file, add a colon after switch name Unattend, then the full path to answer file. Remember that if the answer file path contains any spaces you must put it in between quotation marks. Path F:\MyAnswerFile.xml does not need quotation marks but path "F:\My Answer File.xml" does
A switch is separated from the command with a slash sign (/).

Our command for now is:
Code:
sysprep.exe /generalize /oobe /reboot /unattend:F:\MyAnswerFile.xml
WSIM_30.png
Type the command and Hit Enter. You will see that Sysprep is working:
WSIM_33.png
After a while Sysprep finishes and reboots to Welcome (OOBE) mode. So far so good, Windows starts to prepare computer for first time use:
WSIM_26.png
As normal in OOBE boot, Windows install devices it found:
WSIM_25.png
As my username and password were already set using respective components Windows stops for asking my credentials:
WSIM_27.png
Finally there! As our CopyProfile component has told Windows, all user accounts get the walpaper, gadgets, theme, shortcuts, colors etc. from the new Default Profile. IE has also got a new default home page, every new user account has Seven Forums as home page and Eight Forums in Favorites as the CopyProfile component copied all changes made to built-in administrator account to Default User Profile:
WSIM_32.png



Part 3:

Sysprep existing Windows setup


3.1. Boot to Audit Mode

   Warning
After sysprepping an existing Windows setup it needs to be reactivated. For this you will need your valid original product key.

Do not proceed without backing up your system. The Seven Forums, Eight Forums nor me as the author of this tutorial cannot be held liable if you lose data or functionality of your Windows due failed sysprepping. If the instructions are followed to the letter this is highly unlikely but as a small user error or typo can cause a malfunctioning system I feel it is important to point this out.

For a complete system image backup consult this tutorial: http://www.sevenforums.com/tutorials/663-backup-complete-computer-create-image-backup.html

To boot Windows from normal mode to Audit Mode there can't be any pending reboots due updates. If Windows Update has a pending update reboot, do it now.

Close all applications. Type this to Run dialog or command prompt and hit Enter:
Code:
C:\Windows\System32\Sysprep\Sysprep.exe /audit /reboot

Windows reboots now to Audit Mode.


3.2. Install Windows System Image Manager

Follow the instructions given in 2.3. above.


3.3. Create an Answer File

Follow the instructions given in 2.4. above.

Notice that if you want to use the CopyProfile component when sysprepping an existing Windows setup, you need to delete all user accounts except the built-in administrator account while in Audit Mode. Executing the CopyProfile component will fail if any user accounts exists.

See more: http://www.sevenforums.com/tutorials/285983-user-profile-customize-during-installation.html


3.4. Review and Validate your Answer File

Follow the instructions given in 2.5. above.


3.5. Sysprep Windows using your Answer File

Follow the instructions given in 2.6. above.




Part 4:

Use the Sysprepped Image to install Windows on another Computer


To capture the Windows image and deploy it to another computer, Sysprep needs to be run with Shutdown switch (see 2.6).

The procedure is quite simple:
For a practical reference see these tutorials:
A complete Seven Forums tutorial of capturing a sysprepped image is already "under construction" ;).




Part 5:

Recommended Reading


From Microsoft:
Seven Forums & Eight Forums Tutorials about various Sysprep scenarios:
That's it Folks, for this time.

Kari



Footnote: For those interested this tutorial took 36 straight hours, from a Friday afternoon to early Sunday morning, interrupted only for a few hours sleep Saturday afternoon and occasional toilet and coffee breaks. It took almost a bottle of whisky, a few liters coffee, about the same amount of water, over 30 cigarettes, a dozen or so Mars bars, 10 oranges, two liters of orange juice and two family size deep-frozen pizzas.
 
Last edited:
Kari - Finally got sysprep to work, but running into a couple of problems. Here's what I did to make it work - first, I took out the AutoLogon of the unattend.xml file. Burned a PC back to its original image (just the Windows 7 Pro OS with an Administrator account) and ran Sysprep with "Audit Mode", Generalize un-checked, and "Quit".

When it was done, I ran my Powershell Build which added the accounts, apps, printers, all that we need. When it was done, I ran Sysprep with "OOBE", Generalize checked, and "Shutdown". Booted that image up with an ISO key to save it via Clonezilla to a server. When it was done, I booted it back up and it went through all the "Sysprep is starting services..." et al. It then finally came up to the Windows Set-up page. I hit Ctrl+Shift+F3 so it would let me login as Administrator - which worked, except it tried to auto-logon Administrator and failed. Was able to login properly after that. When I logged in the Sysprep GUI was there, which I expected. Hit Cancel on that, then changed the computer name (Sysprep seems to give it some long name with "WIN-" followed by letters/numbers?) back to our needed computer name, which requires a reboot. Did the reboot and goes all the way back through the "Sysprep is starting services..." screens again, which I did not expect. It again tried to Autologin "Administrator", but is either sending the password blank or putting in the wrong password. I press Enter and login again as Administrator. And again the Sysprep GUI is there.

Logged off and it gave me "Administrator" and "Other User" rather than "Administrator" and our two other accounts names, which I'll call "User1" and "User2". I logged in as "User1" under "Other User" and it went through our Setup scripts to create the desktop for the user and configure the system to work for our needs, but when it was done - there was the Sysprep GUI again on the Desktop! And every time I reboot it, it goes through "Sysprep is starting services" as if it's booting up again for the first time.

So my issues are -


  • It tries to Autologin the "Administrator" account.
  • Acts like it's booting up for the first time during every reboot.
  • The Sysprep GUI is on the Desktop every time you try to login to any account.

Aggravating to come this close, but not figure out how to correct these three things. I did burn the image I'd saved onto another computer and was able to activate both with OEM (slmgr.vbs) and it gives them separate Activation IDs and CMIDs, but I noticed that with Group Policy the SIDs were identical on each PC. I thought Sysprep is supposed to remove that information as well, so that when I run Group Policy on each PC, new SIDs are given?

Thank you.
 

My Computer My Computer

At a glance

Windows 7 Professional 64 Bit
OS
Windows 7 Professional 64 Bit
I read your post, first read did not open it for me completely. Give me some time, I'll brew some coffee and read it again with thought ;).

Back in 5 maybe half an hour so :).
 

My Computer My Computer

At a glance

Windows 10 Pro x64 EN-GB1.6 GHz Intel Core i7-720QM Processor6 GBATI Mobility Radeon HD 5850 Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
OK.

Let's start with what Audit Mode is: it's a special mode of Windows only meant to be used for image customization. The CTRL + SHIFT + F3 key combination when in Welcome Mode (last phase of installation, adding PC name, user and so on) is not to login as administrator but to interrupt Windows installation and enter Audit Mode.

When in Audit Mode, each reboot brings Windows to Audit Mode if the user has not specifically exited it with Sysprep switch OOBE. In other words, selecting Reboot from Start Menu when in Audit Mode will keep Windows in Audit Mode also after the reboot, showing the Sysprep GUI.

You are for some reason in this Audit Mode reboot loop and have not exited it properly. The Sysprep GUI is a clear telltale, it is only shown in desktop after sign in in Audit Mode.

The correct way to do what you are trying to do, as far as I can tell (the example below starts from scratch, installing Windows to your reference computer):
  • Install Windows, enter Audit Mode with CTRL + SHIFT + F3 after the last reboot when installation boots first time to Welcome Mode
  • In Audit Mode, click the Cancel button to close Sysprep GUI, install your stuff, customize Windows as you wish
  • When everything else is clear, create your answer file
  • Sysprep with following command and switches: sysprep.exe /generalize /oobe /shutdown /unattend:X:\Your_AnswerFile
  • When computer has shut down after sysprep, boot it with your imaging live CD (CloneZilla, Macrium etc.) and create your image for deployment. NOTICE! Do not boot reference PC from the newly sysprepped HDD before you have created the image!
  • Now test that the image works by booting the reference computer from the sysprepped HDD. If it boots OK, the image created in previous step is OK and can be deployed

About the computer name, seems Sysprep uses default name because answer file does not contain information about preferred computer name. See step 2.4 in this tutorial, find the below screenshot with explanation in said step and set computer name properly:

263984d1365829336-system-preparation-tool-use-customize-windows-wsim_07.png


Kari
 

My Computer My Computer

At a glance

Windows 10 Pro x64 EN-GB1.6 GHz Intel Core i7-720QM Processor6 GBATI Mobility Radeon HD 5850 Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Thanks again for the quick reply.

I get that about bypassing the Windows Welcome/Setup is used to put me back in Audit Mode, but I don't want that Windows Setup in the first place because I don't want it to create a named account (i.e. Eric-PC) in place of the Administrator account (which is the problem I ran into the first time I tried Sysprep).

I have this section near the very end of my unattend.xml:

<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
<SkipUserOOBE>true</SkipUserOOBE>
</OOBE>

Shouldn't that "SkipUserOOBE" eliminate my seeing the Windows Welcome?
 

My Computer My Computer

At a glance

Windows 7 Professional 64 Bit
OS
Windows 7 Professional 64 Bit
It can't be totally eliminated. When the sysprepped image is deployed, Windows needs to set itself up before the end user can be signed in.
 

My Computer My Computer

At a glance

Windows 10 Pro x64 EN-GB1.6 GHz Intel Core i7-720QM Processor6 GBATI Mobility Radeon HD 5850 Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
I've installed Windows 7 Pro x64 to a virtual machine. Booted into audit mode from the OOBE welcome screen with ctrl+shift+F3 and installed service pack 1 and all windows updates. I then use the system preparation GUI to Boot to OOBE, generalize and shutdown. Reboot into generic WinPE for Windows 7 AIK and capture the drive image with imagex. All seems to go without a hitch and I'm able to restore the system from the created wim file but I cannot create an image catalog of the captured wim with System Image Manager in order to create an answer file for reinstallation. Is this normal for a captured image or am i doing something wrong. My technician and install machines are both x64 so shouldn't be a different architecture problem.

Here is a screen shot of the error
30x8wmx.png


I'm attaching the WSIM log as well... tho not much info in it
 

Attachments

My Computer My Computer

At a glance

Windows 7 Professional x64i5-446016GBNvidia 650Ti
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build
OS
Windows 7 Professional x64
CPU
i5-4460
Motherboard
MSI H97M-G43
Memory
16GB
Graphics Card(s)
Nvidia 650Ti
Hard Drives
Samsung 250 SSD
Antivirus
None
Browser
Internet Explorer 11
I've installed Windows 7 Pro x64 to a virtual machine. Booted into audit mode from the OOBE welcome screen with ctrl+shift+F3 and installed service pack 1 and all windows updates. I then use the system preparation GUI to Boot to OOBE, generalize and shutdown. Reboot into generic WinPE for Windows 7 AIK and capture the drive image with imagex. All seems to go without a hitch and I'm able to restore the system from the created wim file but I cannot create an image catalog of the captured wim with System Image Manager in order to create an answer file for reinstallation. Is this normal for a captured image or am i doing something wrong. My technician and install machines are both x64 so shouldn't be a different architecture problem.

Here is a screen shot of the error
30x8wmx.png


I'm attaching the WSIM log as well... tho not much info in it
Hi Diatomacious, welcome to the Seven Forums.

I am not sure I understand you correctly. Why would you need to create another answer file for further installs? The captured image when used on another machine will install Windows exactly as it was prepared by you, with your original answer file. When installation is finalized (OOBE) on your technician machine after you have captured the image you can find your original answer file (unattend.xml) in C:\Windows\Panther folder.

The subsequent installs do not need to be sysprepped.
 

My Computer My Computer

At a glance

Windows 10 Pro x64 EN-GB1.6 GHz Intel Core i7-720QM Processor6 GBATI Mobility Radeon HD 5850 Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Hi Diatomacious, welcome to the Seven Forums.

I am not sure I understand you correctly. Why would you need to create another answer file for further installs? The captured image when used on another machine will install Windows exactly as it was prepared by you, with your original answer file. When installation is finalized (OOBE) on your technician machine after you have captured the image you can find your original answer file (unattend.xml) in C:\Windows\Panther folder.

The subsequent installs do not need to be sysprepped.

Sorry for the misunderstanding... I should have noted that I did not originally use an answer file for installation. So if I'm to understand correctly I should just use an answer file created from the catalog off the installation disc for installation of the sysprepped image.
 

My Computer My Computer

At a glance

Windows 7 Professional x64i5-446016GBNvidia 650Ti
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build
OS
Windows 7 Professional x64
CPU
i5-4460
Motherboard
MSI H97M-G43
Memory
16GB
Graphics Card(s)
Nvidia 650Ti
Hard Drives
Samsung 250 SSD
Antivirus
None
Browser
Internet Explorer 11
When installing Windows 7, either for one computer only or on a technician computer in order to create a deployment (install) image, let the install run normally until you reach this dialog after the last reboot. press CTRL+SHIFT+F3 to restart in Audit Mode:

263922d1365805777-system-preparation-tool-use-customize-windows-enterauditmode_win7.png


Create an answer file using either an exisitng catalog file, or let Windows SIM create it from install.wim file. Notice that if your install media is write protected, for instance a DVD, SIM cannot use the install.wim as it needs both read and write rights to this file. In this case copy the install.wim from INSTALL_MEDIA\Sources folder to desktop, check the properties of the file after it's copid to be sure it is not READ ONLY, and use this copy to create the catalog.

Now create your answer file and use it when sysprepping. If making an image for later use, use the /shutdown switch with sysprep to shut down the PC after the Sysprep has finished, then capture the image. When image is created, you can reboot the computer and it finishes the installation.

To put it very simple, you will not need the answer file anymore. Your technician computer is now sysprepped with your answer file, as is the image you captured for later use. All installs (deployments) using this image will create an identical Windows, set up as you told in your answer file.

You might find more usable information in this tutorial: http://www.sevenforums.com/tutorials/319903-windows-7-image-customize-audit-mode-sysprep.html. It is basically same as this one but goes more in-depth, being a walkthrough guide for the whole process.
 

My Computer My Computer

At a glance

Windows 10 Pro x64 EN-GB1.6 GHz Intel Core i7-720QM Processor6 GBATI Mobility Radeon HD 5850 Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Hello Kari and thank YOU very much for taking the time and sharing your knowledge.

In the section 2.4. Create an Answer File
when it says:

"Browse to your Windows install media (DVD or USB), open the folder Source and select the file install.wim."

I only have an install.esd file...

Seeing the txt that came in the w7 i got i see:

* Windows 7 Ultimate SP1 X64 Multi-8 ESD April 2015

[ RELEASE INFO ]
* File: Win7.X64.MULTi8.Apr2015.iso
* Source: X17-59465
* Size: 3,55GB
* Format: Bootable ISO

[ CONTENTS ]

* Integrated / Pre-installed in Audit Mode:

* .NET Framework 4.5.2
* Internet Explorer 11
* Hotfixes - 2015-04-14

* Setupcomplete / Post-install:

* NDP45-KB3037581
* KB890930
* Defender Updates

* install.wim compressed to recovery format (install.esd)

My goal was to do your tutorial but with the most update version of w7 i found to avoid as much as possible to mess with updates before sysprepping but im really far cause im stuck at the begining of the creation of my answer file !

Thank YOU for YOUR Time !
 

My Computer My Computer

At a glance

7x64
Computer type
PC/Desktop
OS
7x64
Hello Kari and thank YOU very much for taking the time and sharing your knowledge.

In the section 2.4. Create an Answer File
when it says:

"Browse to your Windows install media (DVD or USB), open the folder Source and select the file install.wim."

I only have an install.esd file...
Hi and welcome to the Seven Forums :).

That's not an issue, you can either download an original Windows 7 install media and use it, or if you want to you can create an ISO Disk Image file from your ESD file and burn it to a DVD or a bootable USB stick.

Check this tutorial for download links for official Windows 7 install images: http://www.sevenforums.com/tutorials/1649-clean-install-windows-7-a.html

To make an ISO image from your own ESD file, see this tutorial at our sister site the Ten Forums: ESD to ISO - Create Bootable ISO from Windows 10 ESD File - Windows 10 Forums. The tutorial works as is also with Windows 7and 8 ESD files.

For your project, this more in-depth walkthrough tutorial might give more tips: http://www.sevenforums.com/tutorials/319903-windows-7-image-customize-audit-mode-sysprep.html

Kari
 

My Computer My Computer

At a glance

Windows 10 Pro x64 EN-GB1.6 GHz Intel Core i7-720QM Processor6 GBATI Mobility Radeon HD 5850 Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
OK, so i downloaded ESDtoISO and copied the menctioned install.esd all in c:\esd directory (on ssd to make it faster).

When i run:
ESDtoISO install.esd

i get:
ERROR: Specified file not found or damaged
 

My Computer My Computer

At a glance

7x64
Computer type
PC/Desktop
OS
7x64
Might be better for you to download the ISO.

Short checklist for the ESDtoISO tool:
  • Extract the zip file to a new folder
  • Copy your install.esd file to this same folder
  • Open an administrator (elevated) command prompt
  • Go to the folder containing the extracted tool files and your ESD, for instance CD C:\ESD
  • Give the command esdtoiso install.esd
 

My Computer My Computer

At a glance

Windows 10 Pro x64 EN-GB1.6 GHz Intel Core i7-720QM Processor6 GBATI Mobility Radeon HD 5850 Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Thanks for this incredible resource Kari, my laphroaig triple wood friend. Much studying to do here about Win PE, installation and recovery kits. Here is an interesting link: http://www.passmark.com/ftp/BIT_WinPE.pdf

I've always gone the laborious way of fresh installs. Now I want to learn PE and imaging, and this journey started last week with my desire to redo my Win7 Enterprise. I wanted to destroy my 1.81TB RAID0 array and simply use one of the single terabyte drives for my user files. I'm using this guide: Move Windows 7 from RAID 0 to Single Disk. How to | Badbod.com

For some odd reason the backup/restore on my Win7 system failed to create a system restore disk, so I had to jump through some hoops to create a Win 7 recovery environment on a USB. See attached jpg. For this I utilized the Windows Automated Installation Kit (AIK) for Windows 7. Instead, could I have used "Windows Assesment and Deployment Kit (Windows ADK) for Windows8.1 Update", as this is what "Paragon Backup and Recovery 14 Free" has prompted me to download and use to create a bootable USB PE environment?

I just completed both my native Windows backup and my Paragon backup. Hopefully I can destroy my RAID0 array and have an extra 1TB drive. I will see later today. Upcoming study of your invaluable "System Preparation Tool - Use to Customize Windows" will hopefully help me to create a much cleaner and streamlined backup these next few weeks/months. :D

7/4/2015 I destroyed my Raid0 and restored my user files to a single drive, now I have an extra 1 TB drive.
 

Attachments

  • Windows 7 Recovery Environment on a USB stick.JPG
    Windows 7 Recovery Environment on a USB stick.JPG
    206.7 KB · Views: 264
Last edited:

My Computer My Computer

At a glance

Windows 7 Enterprise x64i5 3570K delidded 4.2Ghz8Gb DDR3 1600 CL9 @ 800MHz - Kingston HyperxAMD Radeon 6670
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Gigabyte GA-Z77-UD5H rev 1.1
OS
Windows 7 Enterprise x64
CPU
i5 3570K delidded 4.2Ghz
Motherboard
Gigabyte GA-Z77X-UD5H rev 1.1
Memory
8Gb DDR3 1600 CL9 @ 800MHz - Kingston Hyperx
Graphics Card(s)
AMD Radeon 6670
Sound Card
Integrated Realtek ALC898
Monitor(s) Displays
Acer S201HL
Screen Resolution
1600 X 900
Hard Drives
OCZ Agility 4 - 250Gb
Single 1TB Toshiba
PSU
Antec Neo ECO 400W
Case
CoolerMaster HAF 922
Cooling
Noctua NH-D14
Keyboard
Logitech K120
Mouse
Razer Death Adder 3500DPI
Antivirus
Emisisoft Internet Security - Full Version
Browser
Firefox
Other Info
BIOS: f16mod10 Tweaktown.com
WSIM for Seven and WADK for 8, 8.1 and 10 are basically all the same; you can use any of them for preparing a WinPE image or creating answer files for any version of Windows (Seven or later).

You might find this interesting: http://www.sevenforums.com/tutorials/319903-windows-7-image-customize-audit-mode-sysprep.html

I needed to rewrite this tutorial, make it more "walk through" than this one is, so I wrote the above mentioned one. It goes more in-depth.

Keep us posted :)

Kari
 

My Computer My Computer

At a glance

Windows 10 Pro x64 EN-GB1.6 GHz Intel Core i7-720QM Processor6 GBATI Mobility Radeon HD 5850 Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Hi Kari, thanks for your good tutorial.

I have still questions and maybe you can give me the correct answer. Forgive my bad english, iam not a native speaker.

I followed a tutorial written here: 47 - How to install Windows Vista/7/SVR2K8 onto a USB drive (or any partition) - RMPrepUSB to make my Windows 7 Installation portable with USB Flash Drive.

It's working for me, i prepared the USB Stick on a Netbook Intel based with Win7x32. Reboot from USB Flashdrive, all is working and Windows 7 is working fine. I created the username "Lucas" and the Computername was "Lucas-Mobil".

Now i have a cmd file on my desk, i run it as administrator.
This is the command in the file: "\Windows\System32\sysprep\sysprep.exe /oobe /generalize /shutdown"

After executing this file, i connect the USB flash drive with my Desktop PC with AMD and completly different hardware.
It boots from the Flashdrive, install all the needed drivers for the new system, and then the Window appear to set the user account data. I tryed to create the username "Lucas" again, but it told me, the username ist still there, i have to choose a new one. Ok, i try another username, and set the same computername to "Lucas-Mobil"

After the creation, i can see both usernames "Lucas" and the new one "CSL" but i dont want to use the new on, i logged into the account "Lucas", installed all the drivers for the "new" hardware.

Rebootet many times during the process, all works fine.

Ok now, what is my problem?

I want to use my USB Flashdrive to switch it between the two different Computers, my Desktop PC and the netbook. But i don't want to set every time a new username.

If i understand it correctly i still have to uses the sysprep.exe if i want to use the USB Flashdrive again at the netbook.
Is there another way to do this, that i can use the existing useraccount, and don't have to set it again and again?

Best regards.

Lucas
 

My Computer My Computer

At a glance

Win7 64 eXtreme
Computer type
PC/Desktop
OS
Win7 64 eXtreme
First, because Microsoft does not officially support installing Windows 7 or older on a flash drive, I have basically never been interested in it and done it only once just for the fun of it, several years ago. Today I have not the faintest idea or recollection about how I did it. I cannot help you in this matter and suggest that you take your issue to the site where you found the instructions.

Second, every time you run the sysprep to boot to OOBE, the PC goes through the first time setup requiring you to create an administrative user. If you run sysprep on a system where there already are existing users, none of these existing users cannot be used at this point and you have to create a new one.

Third, your sysprep command syntax is a bit wrong. When the /generalize switch is used it must come first. Your command given correctly should therefore be:
Code:
\Windows\System32\sysprep\sysprep.exe /generalize /oobe /shutdown

Kari
 
Last edited:

My Computer My Computer

At a glance

Windows 10 Pro x64 EN-GB1.6 GHz Intel Core i7-720QM Processor6 GBATI Mobility Radeon HD 5850 Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Hi Kari,

thank your for your fast reply.

Maybe i wrote the syntax wrong her, and in the file on my desk it is in the right order, i'll check that later at home.

I test the system in the next days and check which possibilities i have, maybe creating the "new account" with unattended answer and delete the account afterwards and using the first created account.

I will see if it's working or not :)

Thanks for reading my question and answering...

Best regards

Lucas
 

My Computer My Computer

At a glance

Win7 64 eXtreme
Computer type
PC/Desktop
OS
Win7 64 eXtreme
@Kari

When I'm creating my partitions in the answer file, do I need to designated a System partition of say 250MB along with a partition for the OS that fills the remaining disk space? Or will it automatically make the System partition even if I don't specify it?
 

My Computer My Computer

At a glance

Windows 7 x64
Computer type
PC/Desktop
OS
Windows 7 x64
I just successfully completed this and everything went fine for the most part. I attempted to auto-activate the admin account using the appropriate setting in the answer file, but it doesn't appear to have worked. Also, according to Google Chrome "another program corrupted some settings" so it reset things back to default. All-in-all not too bad for a first go I guess :)

A few questions that I have after completing this process:

1) I was doing this on a computer I had setup as a reference machine. Is there a way to not have the answer file applied to the reference machine and everything just resort back to the way it was prior sysprepping? I used the /shutdown switch when I sysprepped, but when I booted that reference machine backup it was clear that answer file I created had been applied to it (booted into OOBE mode). Is the only way to accomplish my question to create a VM and do everything that way?

2) When I run this command:

Code:
sysprep.exe /generalize /oobe /reboot /unattend:F:\MyAnswerFile.xml

Does that effectively append my answer file to the sysprepped image? So when imaging my other computers I don't need to reference my answer file any longer?
 

My Computer My Computer

At a glance

Windows 7 x64
Computer type
PC/Desktop
OS
Windows 7 x64
Back
Top