• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 647
  • Last Modified:

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.
0
sentinelfcu
Asked:
sentinelfcu
  • 5
  • 3
1 Solution
 
Rodney BarnhardtServer AdministratorCommented:
Since you do not specify the error you are getting, it could be an activation problem.

http://social.technet.microsoft.com/Forums/windows/en-US/425bd101-8a87-488c-b2e2-9f2f8113a0d9/sysprep-fatal-error-occurred-while-trying-to-sysprep-the-machine?forum=w7itproinstall

"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"
0
 
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.
0
 
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.
cls
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
)
Echo.
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
)
Echo.

If Not Exist c:\temp md c:\Temp
If Not Exist "C:\AboutThisImage.txt" (
	Echo.
	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.
	Pause
)
Echo.
Echo To execute SysPrep:
pause
Echo Running sysprep...
echo.
Echo *** DO NOT INTERRUPT THIS PROCESS OR THE IMAGE ***
Echo ***  WILL NOT BE RECOVERABLE OR ABLE TO BOOT!  ***
echo.
CD /d c:\Windows\System32\sysprep
sysprep /generalize /oobe /shutdown /unattend:unattend.xml
:End

Open in new window

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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.
0
 
Rodney BarnhardtServer AdministratorCommented:
That usually indicates a permission error. Possibly, the location where you are writing the answer file.
0
 
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.
0
 
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.

http://support.microsoft.com/kb/2524737
0
 
sentinelfcuAuthor 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.
0
 
sentinelfcuAuthor Commented:
Found my own answer which worked.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now