Windows 7 Image - Customize in Audit Mode with Sysprep

How to Create, Customize, and Maintain Windows 7 Image in Audit Mode with Sysprep Tool


   Information

There were two things that made me start writing this tutorial. First one was a very misleading article I read on the Internet and the second one was this response on another tutorial of mine:
...

That said, a follow up article on how to maintain, backup, etc this arrangement (split drives for op and data) in case of a hdd or ssd failure, etc I think would be good. I found lots of chatter about setting it up, but nothing on maintaining and enhancing the setup.

We have covered various Sysprep scenarios at the Seven Forums tutorials but it's true we have not had one telling what then when you have sysprepped, what about upgrading or maintaining the sysprepped system.

I have been planning this for weeks now, finally it's ready. I hope you will enjoy reading it, maybe even learn a new trick or two. All feedback is welcome, post your comments and questions in this thread.

Leipzig, February 4th, 2014

Kari


   Note
Here at the Seven Forums we have several tutorials about installing and customizing Windows, about various scenarios for System Preparation Tool and Audit Mode, and to backup and maintain your Windows 7 setup.

This "walkthrough" tutorial is rather more a supplement to several tutorials already published here, gathering them together showing how to combine different features and procedures in order to create a fully working and highly customized Windows setup, than a tutorial showing you something new.

When a tutorial describing a procedure which is needed or recommended already exists at the Seven Forums or on our sister forums, I will instead of re-typing the information provide a link to said tutorial telling which part(s) of that you need or can do.

This tutorial follows a logical, chronological chain of events and procedures. You should be able to follow it and do everything told on your own PC with quite limited Windows and computing knowledge. I will try to explain everything as clearly as I can but you are always welcome to ask if there's something you did not understand or you disagree. Simply post your questions and issues in this thread.

No commercial third party tools or programs are needed to follow this tutorial, everything will be done using native built-in Windows tools and two additional programs, Windows AIK from Microsoft and Reflect Free from Macrium which are both free to download and use.

No advanced knowledge of Windows or computing is needed, the processes and procedures shown are easy to follow and repeat with basic Windows knowledge.







CONTENTS

This tutorial will cover the following subjects:

  1. Preparing for installing and customizing Windows
  2. Supporting videos
  3. Installing Windows
  4. Entering Audit Mode from post install OOBE dialogs
  5. Installing “all users” software
  6. Customizing the Default User Profile
  7. Installing Windows AIK (Automated Installation Kit)
  8. Partitioning and drive letters with Disk Management
  9. Creating an Answer File
  10. Creating Windows PE (Preinstallation Environment) boot disk
  11. Using Windows System Preparation Tool (Sysprep)
  12. Creating an initial System Image
  13. Finalizing Windows installation
  14. System Maintenance and Windows Update
  15. Upgrading Windows with non-default system folder locations
  16. Recovery using System Image
  17. Using the System Image to deploy Windows to another PC
  18. Links and additional information
  19. Auf Wiedersehen!



Part 1. Preparations

How to prepare for Windows installation and customization


You will of course need a valid Windows 7 installation media to follow and repeat the process shown in this tutorial. It can be a DVD or a USB stick, even an ISO file if you will do the this on a virtual machine.

   Tip
You can do everything told in this tutorial on a virtual machine, in fact I recommend it. It has many advantages. You might for instance have a fully working Windows 7 setup, no need for reinstall at the moment, but creating a customized image for future reinstallation on a virtual machine is fast and makes reinstall when needed a piece of cake. Restoring a system image with your software already preinstalled is usually faster than doing a clean install with no additional software, making your Windows personal and customized from the first boot to desktop.

In Part 11. we will generalize the image (see Part 11. for further explanation), removing all hardware related information and drivers from the image so that it can be used later on any hardware capable of running Windows 7, not only on your own machine. This, of course, requires a valid product key for Windows and each program on image for each computer you use the image to install Windows.

You can use any virtualization platform (Virtual PC, VirtualBox, VMware, Parallels) on any operating system (Windows, Linux, Mac) for following this tutorial to create a customized Windows 7 System Image. See for instance this tutorial for installing Windows 7 on Virtual PC: http://www.sevenforums.com/tutorials/8254-windows-virtual-pc-create-virtual-machine.html. Create the image on a Windows 7 virtual machine running on a Linux Mint machine on a VirtualBox virtual machine, save the image on a stick and take it with you when visiting that Apple fan boy cousin of yours and install Windows 7 from your image to a Parallels virtual machine running on his Mac.

Notice that you can only install 32 guests on Windows Virtual PC, regardless if the host system is 32 or 64 bit. In order to create a 64 bit Windows guest vm on Windows 7 host you need to use third party virtualization programs. Two most common and well known free alternatives are VMWare Player and Oracle VirtualBox, both free to download and use.

This tutorial, the process itself, screenshots and videos were made on a Hyper-V Windows 7 virtual machine running on a Windows 8.1 Pro HP Envy 17 laptop. The vm was given 2GB of RAM, two virtual hard disks (100GB and 500GB) and two virtual CD/DVD drives.

You will also need install media for all software you want to include on your image. Get the install CDs and DVDs ready, download any install files needed and save them to Users\Public\Downloads on a reference computer, not the one you will be using to create our image (Public folders are pre-shared and can be easily accessed when needed). Alternatively for instance if you do not have access to another PC, you can of course use an external storage device, a USB stick or external HDD.

In addition you will need these two tools, both free to download:
If working with a virtual machine, save both installation files on Users\Public\Downloads on your host system.

You will need some time; as the video #1 (Part 2. below) shows, the whole process took from me an hour and a half. But: that's if you know exactly what you are doing and do not need any instructions. Let's be honest, you might need an additional half an hour to occasionally stop to read instructions. This time comes in addition to that needed for Windows installation. Also if you want to include Windows Updates to your image you will need an hour or two more, depending on how many updates will be needed.

Give it two and a half hours, maybe three, four or five if you decide to add Windows Updates to your image. Might sound a lot but think what you get: a highly customized Windows 7 image which makes your all future reinstalls easy and fast. Doing this on a virtual machine allows you to pause the vm or take a snapshot and continue the next day if you want to.




Part 2. Supporting videos

The whole process done in this tutorial on video


The two videos below can be watched here, at YouTube or be downloaded directly to your computer for better quality. Below the videos you'll find list of video content with timestamps on both videos for respective procedures.

Video #1 is mostly to show an unedited time flow, the whole process in real time. Video #2 is edited from video #1 raw footage, with additional explaining still slides. I recommend to download the video #2 to be used as a reference, video #1 to see exactly how a certain procedure is done if it's unfamiliar to you.

An ideal situation would be a dual display setup, playing and pausing the video on one display while creating your image on second display on a virtual machine.

Video #1 - Raw version, uncut, no additional instructions or explanations, no narration. Duration 1:34:09

Video #1 shows the whole process (tutorial parts 4 to 13) of customizing the Windows image, creating an initial system image and finalizing your Windows installation. Video is uncut showing the time flow of the whole process in real time, duration about an hour and a half. Please notice video is not narrated and does not contain any additional instructions or explanations. it's sole purpose is to be a reference; if you want to see how a certain process is done, check the timestamp of it from the list below the videos, jump to that point in video and watch.



Watch full screen in 1080p.

Video #2 - Edited and narrated, with additional instructions and explanations. Duration 15:28

The second video is the same process narrated, cut to 15 minutes and with additional instructions and explanations in between various procedures.



Contents of the video
Red = approx. timestamp in video #1
Green= approx. timestamp in video #2
Tutorial Part 4:

  1. Entering Audit Mode from post install OOBE dialogs (0:00:58)(0:01:33)
  2. Quit and close Sysprep dialog (0:02:50)(0:02:06)
    Tutorial Part 5:
  3. Connect to network share or external storage to get software installers (0:03:20)(0:02:32)
  4. Install “all users” software (0:03:57)(0:03:16)
    • VLC Player
    • SkyDrive Desktop App (Windows Essentials)
    • IE 11
    • Windows XP Mode
    • Windows Virtual PC
    • Office 2013 Professional Plus, install all at first use
    • MSE & definition updates
  5. Reboot requested by updates (IE11 & VPC) (0:24:20)(0:03:45)
    Tutorial Part 6:
  6. Back to Audit Mode desktop, customizing default user profile (0:29:45)(0:03:58)
    • Desktop background from wallpaper thread at Seven Forums
    • Set IE favourites (VF, 7F, 8F, 9F) and home page (7F)
    • Screensaver
    • Icon settings
    • Folder view settings
    Tutorial Part 7:
  7. Install AIK (0:36:28)(0:05:48)
    Tutorial Part 8:
  8. Disk Management (0:39:55)(0:06:20)
    • Change CD/DVD drives D: and E: to W: and X:
    • Rename C: > System
    • Raw Disk 1 500GB > All to D:, rename D: > User Profiles
    Tutorial Part 9:
  9. Launch Windows SIM, create Answer File (0:42:17)(0:07:35)
    • CopyProfile (copy customized elements to default profile)
    • PC Owner & Organization
    • FolderLocations (relocate Users & ProgramData)
  10. Reboot requested by system updates (0:46:45)(0:09:50)
    Tutorial Part 11:
  11. Back to Audit Mode desktop (0:49:10)(0:10:00)
  12. Elevated Command Prompt (0:49:28)(0:10:08)
    • Stop WMP network Sharing Service in case running
    • Sysprep
    • Shutdown
    Tutorial Part 12:
  13. Boot with WinPE (0:59:35)(0:11:41)
  14. WinPE desktop (1:00:06)(0:12:00)
  15. Create System Image (Macrium) (1:00:15)(0:12:10)
  16. Image ready, shutdown (1:15:40)(0:12:39)
    Tutorial Part 13:
  17. Boot to sysprepped C: to finalize installation (1:15:50)(0:12:45)
  18. OOBE dialogs (1:25:18)(0:13:14)
  19. Initial user desktop, check theme and customizations (1:13:40)(0:01:33)
  20. Create new user profile, switch user to check it was created on D: (1:31:35)(0:13:47)
  21. Shutdown, end credits, The End (1:33:20)(0:14:20)
For better quality viewing you can download both original videos to your computer from SkyDrive. Please notice that when watched on SkyDrive the video quality is not very good. Downloaded to your own computer the quality is OK:



Part 3. Installing Windows

How to install Windows



The whole process starts as any Windows installation: boot your computer or virtual machine with Windows 7 install media. As we have covered Windows installation quite extensively here at the Seven Forums I will not go in to details of installation. If you need any help in installing Windows 7, consult one or more of these tutorials:



Part 4. Entering Audit Mode

How to reboot to Audit Mode during installation


When Windows has finished installing the system core on your hard disk or virtual hard disk, the preinstallation environment (Windows PE) which took care of the installation has done its job. A WinPE is like a mini operating system, taking care of vital system functions so that the real OS can be installed, analyzed or repaired. The WinPE checks its own checklist and if all lights are green, hands over the control to real Windows.

Windows thanks WinPE and boots first time. This first boot is called an OOBE boot, OOBE Mode (Out-Of-Box Experience), also known as Welcome Mode. To put it very simple it is (usually) a first ever boot after installation. If you buy a new computer with preinstalled Windows and turn it on, what you see and experience is OOBE Mode: Windows is there, ready to serve you but there's no user accounts yet, no personal data, nothing. A virgin Windows installation.

What we want now is to tell Windows "Sorry, I would like to do some stuff before entering OOBE". Windows accepts our request and let's us reboot to so called Audit Mode, kind of mix of WinPE and OOBE. Not WinPE per se but clearly not OOBE, either.

We do this, postpone the OOBE and boot to work on Audit Mode by pressing CTRL + SHIFT + F3 (press and hold CTRL and SHIFT keys simultaneously, press F3, release all three keys) when OOBE asks your name:
Reboot to Audit Mode.png
Windows reboots now, rebooting to Audit Mode. As no user accounts exist it uses a so called built-in administrator user profile.

Audit Mode alone is nothing, can nothing. A built-in native Windows tool called System Preparation Tool (noun = Sysprep, verb = to sysprep) is needed to tell Audit Mode what to do. As soon as Windows shows the desktop in Audit Mode, it asks Sysprep to come to help as Audit Mode understands that although powerful together with Sysprep, alone it could do nothing.

This is why the first you will notice when finally in Audit Mode desktop is the Sysprep dialog open in the middle of your display:
Rebooted to Audit Mode.png
Normally arriving to Audit Mode for some short maintenance or customization need we could simply click Cancel to close the Sysprep dialog leaving it to stay in the background. However, this time we have some real work to do including installing software which might need Windows Update (WU does not always like Sysprep), so we quit Sysprep: select System Cleanup Action: Enter Audit Mode and Shutdown Options: Quit, click OK to exit.




Part 5. Installing “all users” software

What software should and should not be installed to initial system image


Time to install software. Everything we install now will be made available to all future users of the computer. If you want to install something only you can use and the program's installer allows "Only You" installation modus, do not install it now but instead first after we have finished and Windows is all set up.

My standard software packet to be installed on every image includes Microsoft Office, VLC Player, Windows Virtual PC and XP Mode, Microsoft Security Essentials and SkyDrive app from Windows Essentials. What you want to and need to install is of course up to you.

First things first: Attach your external storage where you downloaded your software installers in Part 1. If you stored everything on Users\Public\Downloads on another computer as I recommended, you need to connect to it now. It can be easily done with following command, both from virtual machine and physical computer as long as the other computer is on the same network.

Open Command Prompt and give following command, press Enter:

Code:
net use DRIVE: \\ComputerName\SharePathOrName /user:ComputerName\Username

... where..
  • DRIVE: = a temporary drive letter you give to your shared folder
  • ComputerName = the name of the computer where the folder you are trying to access is located
  • SharePathOrName = either the name of the shared folder if a share name is given, or the path of said folder
  • Username = your username on the computer you are trying to connect to
Example: I want to assign drive letter Z: to a shared folder Users\Public\Downloads on computer called AGM-W8LAP02, my username on that computer being Kari:

Code:
net use Z: \\AGM-W8LAP02\Users\Public\Downloads user:AGM-W8LAP02\Kari

Now press Enter. Windows thinks a few seconds, asking then your password if password protected sharing enabled on either of the computers, in which case you must give the correct password for the user account and computer you are trying to connect to.
NET_USE_Command.png
Now install your software.

   Note
In Part 1. you downloaded two third party tools, Macrium Reflect Free and Windows Autemated Installation Kit. We will install Windows AIK later but for fluent process flow install the Macrium now.


When you do no longer need access to your network share, right click it on Windows Explorer's Computer view and select Disconnect:
NET_USE_Disconnect.png
Optional: Windows Update

Here's something for you to think: Depending on how old install media you are using, there might be anything up to several hundreds of important Windows updates waiting for you. At some point rather sooner than later you have to install those updates.

There's no need to make updates now to be included in image. However, if you don't update now the update process must be done every time this image is used for deployment (= fancy word for installing by distributing a pre-configured Windows image to a computers). On the other hand, installing Windows updates now takes time but then they are included in the image and a new Windows installed using the image is up todays stand updated.

I let you decide what you want to do. A real life example: I wanted to include all updates, including three language packs in my image. Following two screenshots show the updates I made. It took almost 4 hours (yes, no typo: four hours!) and two reboots before Windows finally told me there's no more updates available.
Update_1.png
Update_2.png
If time is a factor for you, forget the updates for now. If not, I wholeheartedly recommend you to install all important updates, plus from optional updates all language packs you will need (notice: language packs only available for Ultimate and Enterprise editions). The more complete your image is, the more it satisfies you to see how little you have to do when image is used for reinstall.

Important to remember if you decide to run Windows Updates at this point: Windows Update might need to reboot your PC several times. Let update do it in peace:
Update_3.png
As long as we have not especially told Windows to leave Audit Mode, it always returns back to Audit Mode opening the Sysprep dialog. You can now simply close by clicking the Cancel button:
Reboot after updates.png




Part 6. Customizing the Default User Profile

Default User Profile explained, how to customize it


Now it's up to you to decide what to do, how to customize the Windows Default User Profile which is used as the base profile when a new user account is created.

Everything (almost!) you modify now will be included in the new Default User Profile. Desktop background, Windows colors and sounds, screensaver, icon settings, view and positioning, folder sort settings, Internet Explorer Home Page and Favorites.

Take you time, make a nice default desktop. Open IE, browse Internet to open the sites you'd like to save as favorites, change Home Page to whatever you'd like to.
Customize_Theme.png
You can customize the theme as you want to, everything done now will be copied to Default User Profile.

More about customizing Default User Profile:
Seven Forums: http://www.sevenforums.com/tutorials/285983-user-profile-customize-during-installation.html
Microsoft: Customize the default local user profile when preparing an image of Windows

Here some tips about what you can do now:



Part 7. Installing Windows AIK

Windows AIK and SIM: What and why?


Windows Automated Installation Kit is needed in our project because it icludes the right tool to create and edit an Answer File. An Unattended Answer File which we will later create is a set of instructions to Windows System Preparation Tool (Sysprep) about what the user wants to prepare, modify, edit and add in basic Windows System Image.

For the purpose of this tutorial, Windows AIK is a must. First, download and save it to your computer: Download The Windows® Automated Installation Kit (AIK) for Windows® 7 from Official Microsoft Download Center
Download AIK.png
The Windows AIK comes as an ISO file. You need to burn it to a DVD or mount as a virtual DVD if you are working on a physical computer, or attach it as a virtual DVD on a virtual machine.

Now install the Windows AIK:
263955d1365818032-system-preparation-tool-use-customize-windows-7aik_1.png

Notice: You can prepare, create and edit answer files on any Windows PC. If you are editing your Windows 7 deployment answer files on a Windows 8 / 8.1 PC like I am at the moment, you need to use this instead: Download Windows Assessment and Deployment Kit (ADK) for Windows® 8 from Official Microsoft Download Center. Different name, same stuff ;).




Part 8. Disk Management

Set disk system for customized Windows using Disk Management


Before we create an answer file and sysprep our image, it's important to check that the disks are OK, as we want to.

Click Start, right click Computer on the right pane of Start Menu and select Manage. From Management Console select Disk Management:
Disk_Management_0.png

Disk_Management_1.png
Modify your partitions and disks as you wish; change drive letters, create, shrink or extend your partitions, rename your drives.

A few tutorials about and around Disk Management:
Here's what I did now:
Disk_Management_2.png
   Warning
Do not change the drive letter for Windows system drive C:!





Part 9. Creating an Answer File

How to create and edit an Answer File


Now it's time to have some Geek Fun! No, I'm just kidding; working with answer files can be boring. Luckily when you have created a good answer file, later on it's easy to edit in Notepad to make small changes in order to adapt it to new scenarios. An answer file can be extremely flexible, doing almost anything its master (you!) wants.

More about Answer Files, Sysprep and its functions: http://www.sevenforums.com/tutorials/286053-system-preparation-tool-use-customize-windows.html

First, launch the Windows System Image Manager which was automatically installed on your PC when you installed the Windows AIK:
Launch_WSIM.png
Start a new answer file:
File_New Answer File.png
An answer file needs to know for which Windows version and edition it is made for, therefore we need to open a correct basic Windows Installation Image:
Open_ Image_1.png
Browse to folder Sources on your Windows install DVD or USB, find the catalog file (.clg) for your Windows edition:
Open_ Image_2.png
This is what you see now:
263969d1365820704-system-preparation-tool-use-customize-windows-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 except for section headers
  3. Properties of selected answer file item
  4. System messages
Let's start working. First we instruct Sysprep that we would like to relocate (move) system folders Users and ProgramData to drive D:. This procedure saves enormously space on drive C: because absolutely everything inside user profile folders will be stored on D: instead of C:, including temp files, AppData, personal files and so on. YOu don't have to manually move individual folders or edit the registry, Sysprep takes care of it now and you can forget the whole thing in the future. All future user accounts will be automatically created on D:\Users instead of C:\Users.

9.1 OPTIONAL: If you do not want to relocate any folders jump to next step.

See the following 4 self-explaining screenshots to see how you change the location of Users and ProgramData folders:
Open_Components.png

Add_to_Pass_7.png

FolderLocations_1.png

FolderLocations_2.png
Done!

9.2 CUSTOMIZING: Customize the default user profile

Now we copy our modified desktop settings to Default User Profile. 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.

We need to change the value of a variable called CopyProfile to True. 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:
CopyProfile_1.png
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. If you want you can also input values for ComputerName, Owner and Organization:
CopyProfile_2.png
Profile copied, owner and organization info given. We are almost done!

   Tip
You want to personalize the OEM information, seen for instance in Computer Properties? It's easy:
OEM_Info.png


Our Answer file is ready, time to check if it's OK. Click Tools > Validate Answer File:
Validate.png
No errors found, validation results only harmless notifications:
Validate_2.png
Only thing missing is to save the answer file. Select File > Save Answer File As:
SaveAF.png
in this example we save the answer file on root of D: drive with name MyAnswerFile.xml:
SaveAF_2.png
You can close the Windows System Image Manager now.

   Tip
If you have an extra test rig, you can play with Windows System Image Manager to test various components, to see how much amazing things you can do with Sysprep and an answer file.

Follow this tutorial first through to get a working image. Then on your test rig start from beginning of this tutorial until you reach this part and start playing. Test different answer files, change the values of various variables, create your own answer files and sysprep your test rig.

When done, or in case of failing due over zealous creative answer files, just start from beginning.

Even easier if you use virtual machines. Create a new vm, start from beginning of this tutorial and continue until this part. Open the Windows System Image Manager and now create a snapshot (VirtualBox), checkpoint (Hyper-V) or use Undo Disk feature (Virtual PC). Play with answer files and sysprepping, boot to OOBE to test, restore the snapshot to play with a different scenario.






Part 10. Creating Windows PE boot disk

How to create a WinPE disk for imaging, recovery and system maintenance


As told in the beginning of Part 4., a WinPE system is needed when Windows is installed. Installation uses its own PE system to set up the core of the operating system.

WinPE is also a practical tool later on, for troubleshooting, imaging and recovery. We need to create our own WinPE disk now.

If you have followed this tutorial to the letter you installed the free Macrium Reflect imaging and backup tool in Part 5. Macrium has a built-in feature to create a WinPE disk, I'll let our resident Macrium Guru, Distinguished Senior Geek and a friend of mine Wolfgang tell you more about that: http://www.sevenforums.com/tutorials/73828-imaging-free-macrium.html. Tutorial will also tell you how to create a WinPE disk using Macrium.

Another of our resident gurus, Siw2 has specialized in creating ever more unbelievably nice PE systems. For this tutorial I use one of his gems. Siw works constantly with updates to his excellent WinPE , download links to latest versions will be edited here as new versions will become available.

Get the current versions of Siw's WinPE: http://www.sevenforums.com/software/325669-new-versions-simple-winpe-maker-7.html#post2854336

So, you have now downloaded Siw2's WinPE zip packet. Open and extract it:
Extract_RE64.png
When extracted, right click the file RE64v2-runmeasadmin and select Run as administrator:
RE64_1.png
The PE creator starts working:
RE64_2.png
Download suggested tools:
RE64_3.png
For our purposes now we do not need any additional drivers. Press (not click as the screenshot says :)) N and hit Enter:
RE64_5.png
Press any key:
RE64_6.png
Now create a WinPE ISO file, press Y and Enter:
RE64_7.png
ISO done. If you are working on this image on a physical computer, burn the ISO now by selecting Y. IF you want to burn ISO to disk later using your own burner tools, or if you are now working on a virtual machine which allows virtual CD/DVD drives to be used for booting, select N and press Enter:
RE64_8.png
WinPE created, time for "main course": Sysprep!




Part 11. Using Windows System Preparation Tool

How to prepare a Windows image


Let's reboot one more time; Sysprep fails if there are any delayed reboots due software installation or Windows Update.

Windows returns to Audit Mode, we need to click Cancel to close the Sysprep dialog:
304172d1391141292-walkthrough-customize-windows-7-image-audit-mode-sysprep-reboot-after-updates.png

Open an elevated Command Prompt:
Elevated_CP.png
Sysprep fails if Windows Media Player Network Sharing Service (WMPNetworkSvc) is running. Give the following command on Command Prompt and hit Enter:
Code:
net stop WMPNetworkSvc
WMP_Service.png

Sysprep command has various switches, each being responsible of a certain task. We need to use four of them now, in this order:
  • /generalize
    • Removes all hardware related information and drivers from our image, making it possible to use this image to deploy (install) the image on any PC. This is for us an added bonus now, we need to generalize the image anyway because the CopyProfile function we did requires it
  • /oobe
    • We tell Windows that next time the computer is started with this image, we want to finalize Windows installation and enter the OOBE mode
  • /shutdown
    • Instructs Sysprep to run as instructed in our answer file, shutting the computer down when ready
  • /unattend:DRIVE:\AnswerFileName.xml
    • Run anattended, instructions can be found in AnswerFileName.xml on drive DRIVE:
Our Windows install media is inserted in the same drive it was when we selected the Windows image to work with in Windows System Image Manager, beginning of Part 9. Asnwer file MyAnswerFile.xml is on root of the D: drive, WMPNetworkSvc is stopped.

Only the command itself is missing. Type this to Command Prompt:
Code:
%windir%\system32\sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:D:\MyAnswerFile.xml
In other words we instruct Windows to run sysprep.exe command which can be found in Windows Main Directory (folder), in it's second level subfolder system32\sysprep, and when running do generalizing, remember to boot to OOBE when next time started, shutdown when finished for now and read other instructions from the answer file MyAnswerFile.xml which is located on root of the drive D:
Sysprep.png
Sysprep works now and shuts down the computer when done:
Sysprep_2.png



Part 12. Creating an initial System Image

How to create a complete Windows image to be used for reinstallation and recovery


When geeks at the IT department have "sysprepped an image to be deployed", fancy geek lingo to say they've customized Windows to be installed, they quite often use Microsoft's ImageX to "capture the deployment image", again just fancy geek expression for creating an image. ImageX is a good solution for this and might be worth its own tutorial. For our purposes now, we'll use Macrium reflect Free and its easy to understand graphical user interface.

To start, remove Windows install media from drive. Insert the newly created WinPE disk, or on virtual machines attach WinPE ISO to a virtual CD/DVD drive.

Turn on the computer. It boots automatically to Windows PE desktop.

Launch Macrium Reflect (screenshots from Siw2's PE disk):
Open_PE_Macrium.png
See following 4 self-explaining screenshots:
Image_1.png
Image_2.png
Image_3.png
Image_4.png
Shutdown the computer.




Part 13. Finalizing Windows installation

First boot of newly installed Windows


Let's finalize Windows installation.

Remove the WinPE disk from drive or detach it from virtual drive. Power on the computer. It boots now to OOBE Mode as if this was first time ever it was booted.

In Part 5. if you decided to install Windows Language Packs, Windows stops first to ask in which language you'd like to install:
Select_Language.png
From here continue final steps as told in this tutorial, from Step 11: http://www.sevenforums.com/tutorials/1649-clean-install-windows-7-a.html



Part 14. System Maintenance and Updating

How to maintain a Windows setup



Windows 7 is extremely good in taking care of itself. A general consensus seems to be that you do not need and should not use any so called optimizers and cleaners. Any modifications in system registry made by these "tools" most probably causes more harm than when registry is left alone.

If you however feel you'd like to do occasional registry cleaning, use respected, known to work products like CCleaner from Piriform. In my personal, very subjective opinion any registry cleaning is completely unnecessary on a well maintained system; since the days of XP I have never used any cleaners on any of my Vista, Seven and Eight systems and have had absolutely no registry related issues or errors.

Below a few points in maintaining your Windows 7 system I feel are important. Other senior geeks might have a different approach, this is however what has worked for me:
Most important factor in maintaining your Windows setup is to use common sense. Select your AV program, set it to update its database automatically. Use windows or any third party firewall. Surf responsibly, be careful in what you click, browse and follow.




Part 15. Upgrading Windows

How to prepare for upgrading Windows when system folders are on non-default locations


A clean install is always the best method to upgrade your Windows. If you however prefer an in-place upgrade (upgrade install), or if you want to upgrade to a superior edition of Windows using Anytime Upgrade, and you have relocated any system folders like in tutorial we did for Users and ProgramData folders, you have to prepare your Windows for upgrade.

There are two rules concerning us if we want to in-place upgrade a sysprepped Windows 7 where some of the system folders are relocated on another drive than C:.

Rule #1:
- You cannot sysprep an upgraded Windows, be it upgraded to superior edition using Anytime Upgrade, in-place upgraded using install media, or if a repair install has been done (repair install = in-place upgrade to same edition). An unofficial solution to work around this exists, I have tested it and it really works but as I am trying my best to keep these tutorials in accordance with officially supported scenarios, I will not go deeper in this subject.

Rule #2:
- You cannot in-place upgrade or Anytime Upgrade if some of the system folders are relocated on another than C: drive (as Users and ProgramData in this tutorial, part 9.) without first relocating said folders back to C:.

These rules mean that if you have for instance relocated Users folder on D: and then later on you decide to in-place upgrade to Windows 8, you need to move the Users folder back to C:, then in-place upgrade to Windows 8, and when done you are no longer able to relocate Users to another drive with Sysprep as told in tutorial. You are still able to move it manually, but the Sysprep does not run on an upgraded Windows.

Following two screenshots will show a practical example of the above. First, Users and ProgramData relocated on D:, user inserts Windows 8 install DVD and launches the installer:
Installing 8.1 on sysprepped 8.png
Windows can be upgraded but it's done using a custom, clean install, saving the old install (Windows 7) and user files on it to a folder called Windows.old, from where user can later retrieve the personal files to respective new Windows user folders on newly installed Windows 8. However, all software must be reinstalled as they cannot be transferred to new installation.

User decided agains, wanting to keep everything, also the installed apps. A simple Sysprep operation moves the Users and ProgramData back to C:, and after a reboot user tries again. This time he'll see a bit different opening dialog from Windows 8 installer:
Upgrading_2.png
Most geeks are fine with these rules because clean install is always better than upgrade install; geeks do not in-place upgrade ;).

For those few who decide to abandon an excellent space saving system and do the in-place upgrade anyway, here's how to relocate Users and ProgramData back to C:

Hopefully you still have your original answer file stored in some place, you don't need to use Windows System Image Manager to create an answer file now as the answer file we want to can be edited from the original one. For those who no longer have the original MyAnswerFile.xml (part 9.) I'll post the edited "Move folders back to C:" answer file at the end of this part.

You found it? Good, edit it cutting the parts we do not need, leaving just the folder locating part:
Moving_Folders_Back_to_C_2.png
Now you have a much shorter answer file. Between the <FolderLocations> you can easily spot the locations we used to relocate these folders to D:, you just change those two D's to C's and check that everything else is as it should be:
Moving_Folders_Back_to_C_3.png
Save the modified answer file to root of any drive except C: naming it as you want to, with an .xml file extension. I use the name MovingBack.xml for now, saving it to D: drive:
Moving_Folders_Back_to_C_4.png
Now reboot your computer to be sure there's no pending restarts due updates. When done, insert Windows install media to the drive you told in your answerr file as location of source catalog (last line in answer file), open an elevated command prompt[/URL] (tutorial), stop the Windows Media Player Network Sharing Service...:

Code:
net stop WMPNetworkSvc

... and run Sysprep:

Code:
%windir%\system32\sysprep\sysprep.exe /oobe /reboot /unattend:D:\MovingBack.xml
(In /unattend switch, change the location and answer file if not D:\MovingBack.xml)
Moving_Folders_Back_to_C_5.png
Sysprep starts working:
Moving_Folders_Back_to_C_6.png
When Sysprep is done it reboots to OOBE Mode. This time though your user account already exists so you need to use a temporary new username to get further because OOBE initial user cannot be an existing user:
Moving_Folders_Back_to_C_7.png
Moving_Folders_Back_to_C_8.png
Users and ProgramData folders are now moved back to C: drive:
Moving_Folders_Back_to_C_9.png
   Note
Some application specific data cannot be moved at once. In most case the move lefts no trails on drive D: used in this tutorial or whatever drive you had Users and ProgramData relocated before moving them back to C:.

In this example case for instance Microsoft Security Essentials could not move its application data. Instead of moving its app data from D:\ProgramData it creates a new subfolder to C:\ProgramData. This is why you might find D:\ProgramData still existing, with some obsolete subfolders:
Moving_Folders_Back_to_C_10.png
This is totally harmless and you can delete D:\ProgramData manually, taking first its ownership. See tutorial: Take Ownership of file


Finally, here's the MovingBack.xml for those who did not find the original MyAnswerFile.xml to edit. Copy & Paste to Notepad to modify according to your needs:
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="x86" 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>
                <ProgramData>D:\ProgramData</ProgramData>
            </FolderLocations>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="catalog:x:/sources/install_windows 7 ultimate.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>




Part 16. Recovery using System Image

How to reinstall or recover Windows


At some point you start thinking a reinstall. Usually this would include backing up personal files and folders, wiping the hard disk(s), reinstalling Windows, reinstalling software and finally restoring your personal files and folders.

In our method in this tutorial almost everything is done in the same way, except that we do not have to reinstall first Windows and then software. We simply backup the user data, reboot to WinPE, restore the image, reboot to OOBE and finally restore our personal data.

If you have a test rig to play with or you use virtual machines, you can test this and compare: the time neede for a clean install of Windows, updating it and installing all your software is much more than what restoring the image done as in this tutorial takes, both resulting the same.

Here's how to restore your image instead of reinstalling everything:

Shutdown the computer, remove all CDs and DVDs. Insert the WinPE boot disk we created in part 10. and power on the computer. When WinPE has booted, click CMD to launch Command Prompt to connect to a network share to retrieve your system image:

Connect_Network_Share.png

Close the Command Prompt.

Alternatively attach an external storage device containing the image.

Now launch Macrium:

Open_PE_Macrium.png

On Restore tab, open the image file and browse to where you the image stored:

Recovery_Open_Image.png
Recovery_Open_Image_2.png

Click Restore Image:

Recovery_Open_Image_3.png

Click Select a disk to restore to and select the first hard disk on your computer, the one which you want to conatin the system drive C: after the restore and click Next, click Finish:

Recovery_restore_1.png
Recovery_restore_2.png
Recovery_restore_3.png

Macrium starts restoring your image. It will take some time:

Recovery_restore_4.png

When done, shutdown the computer and remove the WinPE disk. Power on computer, it will now boot to OOBE Mode. As this is exactly the same as when doing a first ever boot on your Windows, you'll need to go through the finalizing installation part exactly as described in part 13.

When done, everything is there as you wanted, Windows is ready for a fresh start:

Recovery_restore_5.png
Recovery_restore_7.png

If you restored the original image to a bigger HDD than what was used when the image was created, you'll find some unused HDD capacity at the end of the system disk and can expand your C: drive by taking the unused space and adding it to C: drive:

Recovery_restore_6.png
See the list of Disk Management tutorials at the end of part 8 for more information on expanding the C: drive or creating a new partition using the unused space.

Restore your personal data and you are ready to go.




Part 17. Deploying Windows

Using the System Image to deploy Windows to other computers


To put it simple, deploying means installing Windows using a pre-made image file. As we have now created a personal, customized system image which contains no user accounts or product key, has all necessary software and Windows updates already installed, has very personalized Default User Profile, and finally was prepared using the Sysprep Generalize switch, you can use this image and method described in previous part (part 16) to install image on any PC which is capable of running Windows.

The generalize switch removed any hardware information like machine identity, hardware drivers and so on. This image is truly totally hardware independent.

Remember when deploying your image that it was created for a system with relocated Users and ProgramData and a 100GB C: drive, meaning the PC you want to deploy this image must have at least two hard disks and the system disk must be at least 100GB. The size of the secondary HDD is not important as long as you think it's big enough to hold your user data.




Part 18. Links and additional information

Where to go for further information?



I recommend you reading these articles and tutorials:



Part 19. That's it!

Thanks for reading!


I hope this walkthrough tutorial has given you something new, something you can use. Feel free to post your comments and questions in this thread.

I would also be very pleased to hear from you in case you'll find typing or factual errors in this tutorial, I'm happy to edit it.

Happy Sysprepping!

Kari
 

Attachments

  • 2014-01-31_075252.png
    2014-01-31_075252.png
    315.2 KB · Views: 78
  • In-place_upgrade.png
    In-place_upgrade.png
    44.7 KB · Views: 77
Last edited:
Thanks Wazzbler.

Was going to start this post with the normal "welcome to the Seven Forums" as I usually do when seeing a member has joined and posted his / her first post, then I noticed you have been a member over 4 years already. Your thanks mean especially lot considering you deemed the tut to be worth posting your first post ;).

Kari
 

My Computer My Computer

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,

I appreciate your response, and yes you are absolutely right about having joined years ago. I joined because I found some articles interesting over the years, but never REALLY got into any serious stuff, and so was an occasional browser. However, in the recent past, I have become my company's resident IT person, although my profession is in retail. As I said, I have been a "learn the hard way" person having been fortunate to have had some brilliant 'teachers" along the way who could explain things in a simple enough way for me to understand. Most IT people seem to only speak in binary code, and if the listener doesn't have a degree in computer science, they feel totally inept and stupid. As I have proved that experience (especially making and learning from mistakes) is superior to academic knowledge, I have been called upon more and more to fix other employees computers, reload them, join company domain etc. etc. I even ended up in a thunderstorm 100 feet up on a narrow ledge trying to adjust the satellite dish with a cell phone strapped to my head with a technician 500 miles away trying to get me to adjust the dish alignment. It wasn't a success, because the alignment was not the fault... rats had chewed the cables, but it was something few other retailers have had the opportunity to do. My main reason for studying your tutorial is because I will shortly have to load/reload about 10 laptops in our offices, and knew that there must be an easier way than doing each one separately.

I attempted numerous methods, and all failed or gave different result to what I expected. Fortunately, I came back to seven forums and studied up a bit, and then used your tutorial - I was so happy that at last, it worked EXACTLY as explained in the tutorial. After completing the setup and image, I did a test run on an old laptop. With bated breath, I watched the process, and when the laptop booted to the OOB screen and I logged on to see it worked flawlessly, I was ecstatic. I wish Microsoft had someone with your ability to explain things, because then people like me would not waste countless hours, days and weeks going completely insane wasting time trying to decipher their "computerese" technical jargon. I would have smoked far less, drank a few bottles of Johhnie Walker Black less, and not put a fist through a monitor!

Please keep up the great work, and thank you again,

Wazzbler
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
MSI GT70 2OD
OS
Windows 7 64 Bit
CPU
Intel i7-4700MQ
Memory
16GB
Graphics Card(s)
NVIDIA GeForce GTX 780M
Sound Card
Realtek HD
Screen Resolution
1920x1080
Hard Drives
Intel RAID 0 Volume SCSI 3x100GB
WDC SCSI 700GB
Mouse
MSI Gaming Mouse
Antivirus
Eset Smart Security 7.0.302.26
Browser
Internet Explorer 11; Palemoon Portable x64

My Computers My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
Thanks Siw, I will test it.
 

My Computer My Computer

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
The 32 bit works as well as expected, one more time thanks Siw! Edited the tutorial which previously said the tool was only available for 64 bit versions.
 

My Computer My Computer

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 just saw something of interest upon re-reading. I can install w7 in a VM, install program, updates, my personal data, etc. and image that VM install and restore it to a physical drive later?
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home Built Desktop By DataTech
OS
Windows 7 Ultimate X64 SP1
CPU
Intel i5-2550K, Differing ~4.4-4.8GHz No built in GPU
Motherboard
ASUS P8Z68-V PRO/GEN3
Memory
16GB G.Skill Sniper 1866MHz @ 2133MHz 2x8GB
Graphics Card(s)
ASUS GTX650TIB-DC2OC-2GD5, (650TI Boost)
Sound Card
Onboard Realtek 5-1
Monitor(s) Displays
Samsung P2570HD
Screen Resolution
1920x1080
Hard Drives
Samsung 840 Pro 256GB SSD for OS, 500GB Seagate Constellation (Enterprise drive) for Data
PSU
Corsair HX650W
Case
Inwin Dragon Rider
Cooling
Hyper 212 EVO w/two Noctua fans, push-pull, @1300 RPM
Keyboard
E-Z Eyes, bright yellow keys with large characters
Mouse
steelseries SENSEI Laser Pro Gaming
Internet Speed
48-51Mbs Mbs down, 11 Mbs up Xfinity Cable
Antivirus
Norton Internet Security 2013
Browser
IE 10, Opera, Pale Moon if needed
Other Info
4 case fans, LG BluRay-RE, ASUS DVD-RW, Mr. Fusion power supply, 1.21 gigawatts.
I just saw something of interest upon re-reading. I can install w7 in a VM, install program, updates, my personal data, etc. and image that VM install and restore it to a physical drive later?

Yes. That's how I am doing it.

The Generalize switch when sysprepping really removes all hardware related information so putting it very simple the image does not know afterwards where and how it's done and can be used in deploying the image to any computer, a real physical one or a vm.

There are a lot of added bonuses in doing it on a vm, one of the most important ones for me personally being the flexibility; regardless which OS I have on my host rig I can make and prepare any Windows image. I don't have any IOS or MacOSX devices but my dear Angie has; this laptop I'm using at the moment runs Windows 8.1 Pro installed using an image I made on a Parallels vm running on Angie's iMac.

One more bonus worth mentioning is how easy it is to create a snapshot or checkpoint of your vm, whatever name various virtualization platforms use for their "quick images". You install Windows first, enter Audit Mode and before starting to test different answer file and other scenarios you create a checkpoint and if something does not work as you expected, you simply restore the vm using your checkpoint which takes a minute or so and start again.

I cannot remember when I have last time installed Windows "normally", booting a physical rig from the install media. The vm method is so easy and flexible to use.

Kari
 

My Computer My Computer

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
That sounds very handy then Kari.
When using a VM, say, to create a "perfect" install with all the added stuff, what about the activation key? Many updates won't work without a valid, genuine install and I have only one key to use, which is in use now.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home Built Desktop By DataTech
OS
Windows 7 Ultimate X64 SP1
CPU
Intel i5-2550K, Differing ~4.4-4.8GHz No built in GPU
Motherboard
ASUS P8Z68-V PRO/GEN3
Memory
16GB G.Skill Sniper 1866MHz @ 2133MHz 2x8GB
Graphics Card(s)
ASUS GTX650TIB-DC2OC-2GD5, (650TI Boost)
Sound Card
Onboard Realtek 5-1
Monitor(s) Displays
Samsung P2570HD
Screen Resolution
1920x1080
Hard Drives
Samsung 840 Pro 256GB SSD for OS, 500GB Seagate Constellation (Enterprise drive) for Data
PSU
Corsair HX650W
Case
Inwin Dragon Rider
Cooling
Hyper 212 EVO w/two Noctua fans, push-pull, @1300 RPM
Keyboard
E-Z Eyes, bright yellow keys with large characters
Mouse
steelseries SENSEI Laser Pro Gaming
Internet Speed
48-51Mbs Mbs down, 11 Mbs up Xfinity Cable
Antivirus
Norton Internet Security 2013
Browser
IE 10, Opera, Pale Moon if needed
Other Info
4 case fans, LG BluRay-RE, ASUS DVD-RW, Mr. Fusion power supply, 1.21 gigawatts.
That sounds very handy then Kari.
When using a VM, say, to create a "perfect" install with all the added stuff, what about the activation key? Many updates won't work without a valid, genuine install and I have only one key to use, which is in use now.


A very good question, the answer is a bit complicated and depends on the circumstances.

Let's first talk about retail versions of Windows. As you know installing Windows 7 you do not need to enter a product key. You can skip that and install without a product key as told in step 14 in this tutorial: http://www.sevenforums.com/tutorials/1649-clean-install-windows-7-a.html

You can now finalize and create your image using the grace period with no product key.

Windows 8 is a bit different, you need to enter a product key every time you install, whether a normal install or just for image's sake. However this is not a problem as the Windows product key will in any case be removed when sysprepping the image with generalize switch.

This from another Seven Forums tutorial (http://www.sevenforums.com/tutorials/135077-windows-7-installation-transfer-new-computer.html). I've highlighted the key part:

   Note
What does Sysprep generalizing do to my Windows 7 setup?
  • All system specific information is removed or uninstalled
  • Security ID (SID) of your hardware setup is reseted
  • All system restore points are deleted
  • All event logs are deleted
  • All personalization is removed (taskbar, toolbars, folder options, start orb etc.). Notice that this is not true if the following two conditions are met:
  • Built-in administrator account is disabled (if it was enabled)

What happens when booting first time after sysprep generalizing?
  • First boot configuration is run
  • New SID is created
  • Re-arm counter is reseted if not already re-armed three times
  • Windows 7 is booted using first boot default drivers and settings


Luckily, although always requiring a valid product key when installing (for example for creating an image on a vm), Windows 8 understands that a deployed Windows (installed from a pre-made image) as in opposite to installed (installed using original install media) needs to be checked before entering the product key and activating it. This is why whereas it's impossible to bypass entering the product key when installing, the generalized image let's you to skip the product key when deployed allowing you to check everything works before activating it:

2014-03-09_11h33_50.png

OK, how about OEM Windows? Of course it's quite clear that you cannot install an OEM Windows from a PC manufacturer's hardware specific OEM install media to a virtual machine.

The same if you have bought a normal System Builder's OEM version, it is not hardware specific but can only be used and reactivated on the same hardware setup it was activated for the first time. In case of using OEM you can use the virtual machine method if you have access to a retail key to be used when installing on vm you use for image creation, then when deployed to a real physical target machine use your OEM key. Later, when finally deployed and activated, reactivations are only possible on the very same machine.

In other words, to install for purpose of creating a Windows 8 / 8.1 image for deployment you need to use a retail product key once, to access installation and further enter to Audit Mode. When image is then generalized the product key will be removed and the image can be used to deploy the image to any PC, regardless of which type of product key will be used.

Software? Personally I have a rule not to include any software in my image which requires a product key when installing. Microsoft Office is a good example. If an image I am preparing needs Ms Office 2010 I will not include it in my image because the installation requires a product key. This is the first you'll see when installing Microsoft Office 2010:

2014-03-09_11h46_00.png

Installation requires a valid product key.

However, if the image I am creating will have Ms Office 2013 I will include it in the image (install it) because the Office 2013 only asks the product key when first time used, not when installed.

OK, here's the short version: Retail Windows as well as software which does not require a product key when installing, no problems. Hardware specific or System Builder's OEM Windows on Windows 7 totally OK by skipping the product key and activation and preparing the image on non-activated Windows using the OEM key first on target machine when deployed. On Windows 8 and 8.1 possible using a retail key when installing on production machine for image creation, and the final OEM key only when deployed to target machine. In some extent software requiring a product key when installing, doable but not practical.

Kari
 
Last edited:

My Computer My Computer

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 a lot Kari, especially on the software requiring a key to install with. Photoshop and CorelDraw are that way too.
I have Office 2007 so I reckon it want a key to install too, I don't remember.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home Built Desktop By DataTech
OS
Windows 7 Ultimate X64 SP1
CPU
Intel i5-2550K, Differing ~4.4-4.8GHz No built in GPU
Motherboard
ASUS P8Z68-V PRO/GEN3
Memory
16GB G.Skill Sniper 1866MHz @ 2133MHz 2x8GB
Graphics Card(s)
ASUS GTX650TIB-DC2OC-2GD5, (650TI Boost)
Sound Card
Onboard Realtek 5-1
Monitor(s) Displays
Samsung P2570HD
Screen Resolution
1920x1080
Hard Drives
Samsung 840 Pro 256GB SSD for OS, 500GB Seagate Constellation (Enterprise drive) for Data
PSU
Corsair HX650W
Case
Inwin Dragon Rider
Cooling
Hyper 212 EVO w/two Noctua fans, push-pull, @1300 RPM
Keyboard
E-Z Eyes, bright yellow keys with large characters
Mouse
steelseries SENSEI Laser Pro Gaming
Internet Speed
48-51Mbs Mbs down, 11 Mbs up Xfinity Cable
Antivirus
Norton Internet Security 2013
Browser
IE 10, Opera, Pale Moon if needed
Other Info
4 case fans, LG BluRay-RE, ASUS DVD-RW, Mr. Fusion power supply, 1.21 gigawatts.
Hi Kari,

I had previously posted how well this tutorial worked.

Your tutorial worked flawlessly when restoring the Macrium Image to an old HP6830s "test" laptop. Total restore process with ALL updates, programmes etc. in less than 8 minutes.

However, when I tried to do the same on my newer MSI laptop, I constantly got a BSOD when windows first starts after the Recovery. I tried several times, with different BIOS settings, but constantly had a BSOD. It seemed that sevenforums.com was offline for the past few days, so I looked elsewhere for advice - with little success. One of the sources suggested that the problem was due to my main hard drive being partitioned, and I should first use a Hard Drive Partitioning tool to delete and format the drive before doing the image restore.

Does this make sense, or is there something else I am missing?

Regards,

Wazzbler.
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
MSI GT70 2OD
OS
Windows 7 64 Bit
CPU
Intel i7-4700MQ
Memory
16GB
Graphics Card(s)
NVIDIA GeForce GTX 780M
Sound Card
Realtek HD
Screen Resolution
1920x1080
Hard Drives
Intel RAID 0 Volume SCSI 3x100GB
WDC SCSI 700GB
Mouse
MSI Gaming Mouse
Antivirus
Eset Smart Security 7.0.302.26
Browser
Internet Explorer 11; Palemoon Portable x64
Hi Kari,

I had previously posted how well this tutorial worked.

Your tutorial worked flawlessly when restoring the Macrium Image to an old HP6830s "test" laptop. Total restore process with ALL updates, programmes etc. in less than 8 minutes.

However, when I tried to do the same on my newer MSI laptop, I constantly got a BSOD when windows first starts after the Recovery. I tried several times, with different BIOS settings, but constantly had a BSOD. It seemed that sevenforums.com was offline for the past few days, so I looked elsewhere for advice - with little success. One of the sources suggested that the problem was due to my main hard drive being partitioned, and I should first use a Hard Drive Partitioning tool to delete and format the drive before doing the image restore.

Does this make sense, or is there something else I am missing?

Regards,

Wazzbler.
First, the Seven Forums has not been offline, I have been online several hours each day. Try clearing your browser cache.

Second, the suggestion you got might make sense, in two different ways:
  1. Your new laptop's HDD is partitioned so that the C: drive is smaller than the C: drive in image, in other words the C: drive on the machine you used to create the image, or the laptop only contains one drive or partition and your image is using sysprep to relocate Users and ProgramData folders to another drive
  2. Your new laptop is using UEFI instead of BIOS; an image created on a BIOS based machine can naturally only be used on other BIOS machines, and an UEFI image on machines with UEFI
Kari
 

My Computer My Computer

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,

I hope I am not trying your patience, as I probably come across as a noob, even with about 20 years of messing up computers and then fixing them under my belt! I am not sure what the problem was, but I constantly got a "page cannot be displayed" message until today, and my cache is cleaned frequently - irrelevant really, as I can now communicate with the "Master"

Maybe I should have given a bit more info:
  1. Image was created on my MSI G Series laptop using the PE mentioned in your tutoial. Image size was just shy of 20GB.
  2. Image Restored PERFECTLY on a relatively old HP Laptop
  3. Attempted a restore on my MSI (where I created the image) but got a BSOD at first boot
  4. The C Drive on the MSI is always left as one partition (a 300GB SSD) This obviously excludes the system hidden 100MB partition
  5. Please elaborate on your UEFI or BIOScomment - I cannot fathom how this would affect the recovery to the identical machine where I did the install, audit mode, sysprep etc. in an Oracle VM and created the image, but restored without hitch on another (older) machine.
I am simply trying to figure out why it BSOD'd and what suggestions anyone may have to do this your 8 minute way instead of the 3 plus hour way when I reload all the other computers in my office soon.

Regards,

Wazzbler
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
MSI GT70 2OD
OS
Windows 7 64 Bit
CPU
Intel i7-4700MQ
Memory
16GB
Graphics Card(s)
NVIDIA GeForce GTX 780M
Sound Card
Realtek HD
Screen Resolution
1920x1080
Hard Drives
Intel RAID 0 Volume SCSI 3x100GB
WDC SCSI 700GB
Mouse
MSI Gaming Mouse
Antivirus
Eset Smart Security 7.0.302.26
Browser
Internet Explorer 11; Palemoon Portable x64
1. Image was created on my MSI G Series laptop using the PE mentioned in your tutoial. Image size was just shy of 20GB.
Image file size and image size are two different things (the real, absolute image file size and the minimum size of HDD it can be restored to).

In fact, a system image file has three different sizes: the compressed image file size, uncompressed image file size and size of the HDD it was created from.

Let me give you an example. Here's a basic Windows 7 Ultimate x86 image I have created with Macrium Reflect:

2014-03-11_11h49_04.png

You can see that its compressed size on disk is 14.3 GB. Let's explore the image:

2014-03-11_11h55_51.png

Now we can see that the uncompressed image file size is 21.1 GB (#2 in below screenshot), and that the actual image size is 250 GB (#1 in screenshot, drive C: size when image was created = minimum size of HDD it requires to be restored to):

2014-03-11_11h57_01.png

The only size you should keep in your mind is the capacity of the partition C: on the machine used to create this image, at the moment of image creation. That will be the minimum size of the drive C: you need to restore this image.

Conclusion: although the compressed image file size in this example is under 15 GB, this image cannot be restored to a partition smaller than 250 GB.


2. Image Restored PERFECTLY on a relatively old HP Laptop

Meaning the HP laptop had drive C: big enough, and is using older BIOS instead of newer UEFI (see my answer to your question 5.).


3. Attempted a restore on my MSI (where I created the image) but got a BSOD at first boot

See my answer to your question 5.


4. The C Drive on the MSI is always left as one partition (a 300GB SSD) This obviously excludes the system hidden 100MB partition

Does your image relocate Users and ProgramData folders? Does your HP laptop have two HDDs or one HDD partitioned to two drives? If the answer on both questions is yes, then there's your culprit, the MSI HDD must first be partitioned so that the folders which will be relocated have a target drive.

5. Please elaborate on your UEFI or BIOScomment - I cannot fathom how this would affect the recovery to the identical machine where I did the install, audit mode, sysprep etc. in an Oracle VM and created the image, but restored without hitch on another (older) machine.
Your image was not created on an MSI laptop; instead it was created on a VirtualBox virtual machine. These are two totally different things.

If I create an image on a BIOS based vm (as your VirtualBox vm) on an UEFI based computer, the image is of course BIOS. The host system and it's system specifications are totally irrelevant, only the machine which you use for creating the image - in this case a VirtualBox vm - matter.

Kari
 
Last edited:

My Computer My Computer

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 you for your patience!

Now that you got me to understand that a VM is NOT the same as a real Hard Drive (DUH), I feel like a right royal IDIOT! Maybe I should have realised that Virtual Life and Real life are not the same thing, but there you go.... As one of my bosses said to me years ago:

"You are pretty slow to catch on, but when you do get it, you are quite fast!"

I also did not originally get the whole Image Size and C drive to restore to bit, but you have made me see the light!

So, to answer your questions:

I did not set the image up to relocate User data etc. and the HP has only one HD - not partitioned
The MSI has 2 Hard Drives, and C is not partitioned - so reading your mail makes me think that this might just be where some of my problems arise...

Thanks again for your patience and clear explanation - I will try the whole process again IN REAL LIFE instead of Virtual, and see what happens.

Regards,

WAZZBLER
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
MSI GT70 2OD
OS
Windows 7 64 Bit
CPU
Intel i7-4700MQ
Memory
16GB
Graphics Card(s)
NVIDIA GeForce GTX 780M
Sound Card
Realtek HD
Screen Resolution
1920x1080
Hard Drives
Intel RAID 0 Volume SCSI 3x100GB
WDC SCSI 700GB
Mouse
MSI Gaming Mouse
Antivirus
Eset Smart Security 7.0.302.26
Browser
Internet Explorer 11; Palemoon Portable x64
Create a system image of your MSI laptop first before starting to play with it so you can restore it if something does not work!
 

My Computer My Computer

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
Create a system image of your MSI laptop first before starting to play with it so you can restore it if something does not work!

Hi Kari, Thanks for the advice. Fortunately, imaging is something that goes without saying... I always make an image when the basics have been loaded- Windows, Drivers, basic Software etc. stored in two separate places, and then another image or two when joining the domain.

Another thought (dangerous as it may be!): On one of your other tutorials, http://www.sevenforums.com/tutorials/135077-windows-7-installation-transfer-new-computer.html you post a warning about RAID:

"I do not recommend to use this method on RAID systems. All experiments on RAID I know have failed."

As my MSI C drive is actually 3 SSD drives in RAID format, do you think this may have caused the BSOD problem with the image restore process, or am I seeing problems that might not even exist?

Hopefully, I will not harass you after this!

Regards,

Wazzbler
 
Last edited:

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
MSI GT70 2OD
OS
Windows 7 64 Bit
CPU
Intel i7-4700MQ
Memory
16GB
Graphics Card(s)
NVIDIA GeForce GTX 780M
Sound Card
Realtek HD
Screen Resolution
1920x1080
Hard Drives
Intel RAID 0 Volume SCSI 3x100GB
WDC SCSI 700GB
Mouse
MSI Gaming Mouse
Antivirus
Eset Smart Security 7.0.302.26
Browser
Internet Explorer 11; Palemoon Portable x64
With today's fast HDDs and SSDs and fast & easy imaging methods, I have since long seen no reason for RAID setups. Not for security reasons, not for speed. That's why I although having quite a many advanced computers I have not a single RAID system, have not had in many years.

That being said, I have tested sysprepping a RAID setup a few times and it has always failed. I have also tried to restore an image created in a normal (no RAID) setup to a RAID setup a couple of times, without success. Theoretically there's no reason why it should not work and I have not an idea why it fails, I'm simply saying that I have tried it but it didn't work for me.

Sorry I can't give you a better answer.

Kari
 

My Computer My Computer

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 Kali,

Thank you so much for the valuable input and advice. I bought my MSI preconfigured with the RAID setup, so am now wondering if it possible to change it to a "normal" setup. This is something I have never even tried before, so was wondering if anyone has any comments on the idea.
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
MSI GT70 2OD
OS
Windows 7 64 Bit
CPU
Intel i7-4700MQ
Memory
16GB
Graphics Card(s)
NVIDIA GeForce GTX 780M
Sound Card
Realtek HD
Screen Resolution
1920x1080
Hard Drives
Intel RAID 0 Volume SCSI 3x100GB
WDC SCSI 700GB
Mouse
MSI Gaming Mouse
Antivirus
Eset Smart Security 7.0.302.26
Browser
Internet Explorer 11; Palemoon Portable x64
Hello Kari,

Excellent tutorial. Still going over it. I do tend to go over the steps a few times to ensure that I have all that is needed.

Was wondering about 2 things:
(1) Is there a reason why you chose to partition/manage the drives after win-7 installation? Will it impact anything if I format/partition during the win-7 install? Please let me know.
(2) Regarding updates that require Genuine copy - There are many updates that seem to require a genuine copy of windows and I was a bit confused with your earlier response on this topic. I can enter my key since I will be the only one using the image for my current laptop, I was wondering at what step can I enter this.

Thanks again for your help, time and effort.
 

My Computer My Computer

Computer type
PC/Desktop
OS
Win-7 Prof 64bit
Back
Top