Windows 7 WIM Deployment

Posted on 2013-01-29
Last Modified: 2013-02-20

Recently I have been researching deployment methods for Windows 7 in order to speed up our installs. To start with, this is what I have done so far...

- Set up a 'base' system. Installed Windows 7 Professional 64-bit with all Windows Updates, additional programs, runtimes etc. Ran Sysprep with oobe and generalize and shut down.

- Created a Windows PE disk with Imagex on. Booted this on the 'base' system and captured a WIM file.

- Obtained an ISO of Windows 7 Professional 64-bit and extracted it with 7-zip. Removed the install.wim file from the sources folder and replaced it with my custom wim - also called install.wim

- Used ImgBurn to create a new iso (also tried using a bootable USB).

Booting from this all seems to go well at first.
- Copying Files
- Expanding files
- Installing features
- Completing installation
All of this completes, then it restarts the system. Upon restarting it gets to "setup is starting services" then throws the below error message.

"Windows could not finish installing the system. To attempt resume configuration, restart the computer."

Restarting the computer just re-creates the error again and again.

I'm stuck as to what is causing this error. Any ideas? Can you spot anything I have done incorrectly?
Question by:KTBerwick
  • 5
  • 3
  • 2
  • +1
LVL 13

Expert Comment

by:Gabriel Clifton
ID: 38833081
Could be sysprep corruption, sysprep did not completely before shutdown or something not configured correctly in the unattend.xml. On the base system where you created the image and ran the sysprep from, what does it do if you boot it up normally?

Author Comment

ID: 38833111
For some unknown reason it never came to mind to boot up the base system and see if it actually works. Such an obvious thing to check as well!

Unfortunately I can't check until tomorrow since I'm not in the same building any more.

Is it essential to create an unattend.xml file? I did not create one during this process.
I don't mind inputting the Username, time zone, update preferences etc manually so I left it out (for now anyway). Didn't want to add more complications in something I already know little about.
LVL 13

Expert Comment

by:Gabriel Clifton
ID: 38833124
The sysprep uses the unattend.xml to help make it generic again.
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.


Author Comment

ID: 38833159
In that case I will definitely look into making the unattended.xml file.

An very odd development...

If I reboot the system into safe mode it gets to the same stage and tells me the installation cannot be completed in safe mode, as you would expect. When I reboot again, normally this time, it opens this Windows Installation screen back up:
- Copying Files
- Expanding files
- Installing features
- Installing updates
- Completing installation

They are all marked as completed apart from the last entry. After about 30 seconds it reboots the computer and the installation completes! All my installed programs and updates are there, everything seems as expected.

Done another fresh install (in a VM) and exactly the same thing happened. Seems like something is getting stuck and going into safe mode dislodges it.

So I guess I'm getting to where I wanted but in a very weird way.
LVL 13

Expert Comment

by:Gabriel Clifton
ID: 38833198
That is strange considering that I cannot think of anything in safemode that will "dislodge" the final step.

Author Comment

ID: 38833271
Me neither. Very strange indeed but hey it works.

I'l try creating another image in the next few days and see how that goes. I need a Home Premium image anyway.
LVL 22

Assisted Solution

by:Adam Leinss
Adam Leinss earned 500 total points
ID: 38836532
Why not use MDT 2012 from Microsoft?  It's all wizard driven and includes everything you need "in-the-box".

Accepted Solution

KTBerwick earned 0 total points
ID: 38843619
Thank you very much for suggesting MDT. I used it to create another WIM of Win 7 Home Premium and it was a LOT easier.

I have figured out the cause of this error message and a solution.

It was nothing to do with capturing and deploying the image. Sysprep was not completing fully because of AVG Antivirus that I had installed. I uninstalled AVG and replaced with MSE before running Sysprep again. This time it went without a hitch.

 I used this method to find out what was causing the error...

This issue is caused by certain registry keys that are either:

a) Larger than 8kb

b) Set with incorrect permissions

c) Corrupt in some way

When you see the error message, do the following:

1.) Push Shift+F10 to get to a command prompt

2.) Navigate to C:\windows\Panther

3.) Find the Setup.etl file and find a way to copy this file off of the system (I copied it to the D:\ partition and used Ghost to gather that partition and get the file off)

4.) Copy the setup.etl file from the corrupted system to another computer that has Windows 7.  Put it on the root of C:\ for easiest access.

5.) Open a Command Prompt on the Windows 7 computer.

6.) Navigate to the root of C:\ (or wherever you saved the file)

7.) Type "tracerpt setup.etl -o logfile.csv"

8.) Close the command prompt and open up logfile.csv in your text editor of choice.

9.) Look through the log file (towards the end probably) for messages that say "Failed to process reg key or one of it's decendants"  For me, the exact eror looked like this: "Failed to process reg key or one of its descendants: [\REGISTRY\MACHINE\SOFTWARE\ESET\ESET Security\CurrentVersion\Plugins\01000200\Profiles\@My profile]"  If you search for "reg key" or "failed to process" you should find the failure.

10.) Remove this software from your image, or find out how to get the registry key that is failing to work properly.

Credit to Jeff Harrison on TechNet for this solution.
LVL 22

Expert Comment

by:Adam Leinss
ID: 38843645
Interesting!  I added that to my notes.
LVL 17

Expert Comment

by:Mike T
ID: 38873996

You've pretty much got there on your own with help from Jeff, so well done.

For anyone reading the solution in future, there were two uneccessary steps: 1 - the bait and switch with install.wim, 2 - putting apps in the original image.

Unfortunately antivirus products wreak havoc with OS deployment, so avoid installing until the OS is done.

Using MDT instead is by far the easiest, quickest way to achieve all the above, as you've found. Checkout the customsettings.ini file for serious automation if you need it.


Author Closing Comment

ID: 38908685
It fixed my problem.

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to line 23 55
Batch File search for Drive Letter 8 44
Upgrading Windows 7 2 24
How do you do a firmware update on HP Proliant Servers? Smart update manager? 3 32
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question