Imaging Windows 7 using sysprep.

I am trying to build an image of Windows 7.  I installed Win 7 open license, install all apps and drivers on the system.  I have stopped the windows media player under processes and I go in and run sysprep to go into audit mode, generalized and reboot.  At this point my system tries to reboot and gives me an error of Windows can not finish installation and to finish configuring to restart.  Click OK is all you can do and the system restarts and comes right back to the same error, after trying several things I believe I am back at rebuilding my image for the 3rd time and attempting again.  Can anyone give me any insight on what might be happening here.  I have found several postings but haven't really found anything that seems to completely match my issue.
Who is Participating?
sentinelfcuConnect With a Mentor Author Commented:
I apologize for not getting back to this question, but what I ended up doing was having the image save to the original hard drive and then copying the .wim file from the original drive to another usb drive for deployment to other systems.  I appreciate everyone's help here and again I am sorry that I didn't get back to this sooner.
Rodney BarnhardtServer AdministratorCommented:
Since you do not specify the error you are getting, it could be an activation problem.

"open a command prompt, type: slmgr /dlv to view how many times of remaining Windows Activation count. Generally speaking, to sysprep the image on a single computer for multiple times, you need to configure the Microsoft-Windows-Security-SPP | SkipRearm to 1 in the unattend.xml file. I am assuming whether you configure the Microsoft-Windows-Security-Licensing-SLC | SkipRearm to 1 instead of SPP, the SLC setting is deprecated and should not be used.  

As a work around of this problem, please type: regedit in the Start Search box to open Registry Editor, set the value of GeneralizationState under HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7, then run sysprep again.

If the same issue still persists, please unistall the MSDTC and Reinstall it, then try the sysprep.
To uninstall MSDTC :- msdtc -uninstall
To reinstall  MSDTC :- msdtc –install"
sentinelfcuAuthor Commented:
I really don't know how to specify the error cause I can not get to any logs, once it reboots to audit mode I cannot get any further or go back.  I will try this and get back with you, I need to rebuild the system again before I can do any of this because the system boots into a screen showing that setup is being ran for the first use and then goes black and then to a windows error recovery screen to choose how to boot.
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Lee W, MVPTechnology and Business Process AdvisorCommented:
It's not clear what order you're doing but I'm rebuilding an image today and tomorrow.  The correct procedure is:

0. Create an Answer File from the ADK.
1. Install Win7 Pro or Enterprise via VL media
2. At FIRST boot of Win7, press CTRL+SHIFT+F3 to enter audit mode (this is the screen asking for the computer name and user)
3. Install all apps, updates, etc that are appropriate.  Reboot as needed (IGNORE the sysprep reboot prompt that comes up - don't use it or if you use it, MAKE SURE you don't set it to OOBE until you're done and ready to seal the image.
(I use the script below to run sysprep)
4. SHUTDOWN - DO NOT REBOOT. Capture the image.

@echo off
set PathToUnattend=\\server\share\path\unattend.xml
REM Clearing screen to get rid of error about UNC paths being unsupported.
Set SetupComplete=%windir%\setup\scripts\SetupComplete.cmd
if not exist "%windir%\setup\scripts" md "%windir%\setup\scripts"
echo if exist "%windir%\system32\sysprep\unattend.xml" del /q /f "%windir%\system32\sysprep\unattend.xml">%SetupComplete%
echo if exist "%windir%\panther\unattend.xml" del /Q /F "%windir%\panther\unattend.xml">>%SetupComplete%
copy "%PathToUnattend%" "C:\windows\system32\sysprep">nul
If exist %SetupComplete% (
	Echo The %SetupComplete% file was found; 
	Echo contents as follows:
	Echo ==========================================================================
	Type %SetupComplete%
	Echo ==========================================================================
) Else (
	Echo %SetupComplete% file was NOT FOUND!  Aborting!
	Goto End
If Exist "C:\windows\system32\sysprep\unattend.xml" (
	Echo The UNATTEND.XML file was found!
	find /i "copyprofile=true" "C:\windows\system32\sysprep\unattend.xml">NUL
	If "%errorlevel%"=="0" Echo Found COPYPROFILE=TRUE - Profile used in setup will be set as default!
) ELSE (
	Echo UNATTEND.XML was NOT FOUND!  Aborting!
	Goto End

If Not Exist c:\temp md c:\Temp
If Not Exist "C:\AboutThisImage.txt" (
	Echo No "About This Image.txt" file found in C:\
	Echo Please create a text file by this name and include details about 
	Echo this image, including what was initially included, the build date
	Echo and other significant information before you continue this script.
Echo To execute SysPrep:
Echo Running sysprep...
CD /d c:\Windows\System32\sysprep
sysprep /generalize /oobe /shutdown /unattend:unattend.xml

Open in new window

sentinelfcuAuthor Commented:
There was some other items that have come up that needs my attention, but when I try to make my answer file it is failing with the error of parameter count mismatch.  I am in the process of resolving this issue before I can attempt this again.
Rodney BarnhardtServer AdministratorCommented:
That usually indicates a permission error. Possibly, the location where you are writing the answer file.
sentinelfcuAuthor Commented:
I tried writing the file to the local which I have local admin permissions, I have tried writing to network share which I have admin permissions on, I have even tried writing it to my documents folder on the network which I have full permissions to.  All of them come out with the same error.
Rodney BarnhardtServer AdministratorCommented:
There is a Microsoft KB for a parameter mismatch error. I am not sure if it would apply, but you could check it out.
sentinelfcuAuthor Commented:
Found my own answer which worked.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.