Problems with Sysprep, Win 7 Pro SP1, error on reboot.

Posted on 2011-05-10
Last Modified: 2012-05-11
We are having issues with our sysprep procedure.   I could repost everything here, but it might be easier to just link to comments on an Article.  Here is our comment Sysprep Article. It is part of a bigger discussion, but I was hoping someone with some knowledge could take a look and let us know what they think.

Right now, after a reboot of the setup machine we get an error at t Windows Shell Setup on pass 4, specialize.  I am gone through several procedures, including pulling a new .wim file, creating a new catalog and then constructing a new XML answer file.

Question by:IELTechServices
    LVL 21

    Expert Comment


    In your unattend.xml file I see that there is an * for  the computer name. If you aren't already doing so you should try leaving this blank, Eg.

    Also something simple you can try is using the full path in the sysprep command when running sysprep. Eg.
    "C:\Windows\System32\sysprep\Sysprep.exe" /generalize /oobe /shutdown /unattend:"C:\Windows\System32\sysprep\unattend.xml"

    Let me know how that goes.

    Author Comment


    I am going to try <ComputerName></ComputerName>, though I am not using the MySysprep2 component that your article is partially based on, would that make a difference?  aka, will there not be a prompt to name the computer if I just leave it as <ComputerName></ComputerName>, considering I am just using the built-in sysprep?  

    MS says that <ComputerName></ComputerName> is valid (assumes it uses the pre-sysprep computer name?) or blank or * (asterisk) to create a randomly generated name...

    LVL 21

    Expert Comment

    No, you will not be prompted for a computer name if you use: <ComputerName></ComputerName> with sysprep.exe. I think it will add the computer to the domain under a random name.

    Let me know how it goes.

    Author Comment

    No string/blank in the computer name didn't help.  Still get the same errors.  Help states this:
    If ComputerName is missing, you must enter a computer name during Windows® Welcome.

    If ComputerName is set to an asterisk (*) or is an empty string, a random computer name will be generated. This random name has at most eight characters from the RegisteredOwner and/or RegisteredOrganization strings plus random characters.

    Computer_name is a string with a maximum length of 15 characters.

    Verbatim, the error reads:

    Windows could not parse or process the unattend answer file for pass [specialize]. The settings specified in the answer file cannot be applied.  The error was detected while processing the settings for component [Microsoft-Windows-Shell-Setup].

    This is using the full file path to the .xml file or just the reference to the file in the sysprep folder...

    This is bewildering.  In Shell-Setup I only have a few things set, just the basics, including the prod key, org/owner, etc.  I DO have CopyProfile as True and I know that didn't work right away when Win7 came out, but I understand it does work now. Additionally, it didn't throw an error when it didn't work - it just provided no result.


    Author Comment

    Frustratingly enough, TechNet says to check the log files:
    However, after I sysprep and shutdown the machine and then start it back up (as if I had imaged it to 1 other machine [or a 1000 other machines]) the error prevents the machine from ever starting up fully. So there isn't a way to access the logs.

    I suppose I could piggy back the drive on another box and see if there is any logs written to the HDD at that point, but that seems a bit much of MS to ask.

    Accepted Solution

    Some success. It cleanly booted with no errors after doing this:

    Essentially you need to go into regedit and from the profiles list entry you need to remove all but the one you are using and local Administrator. Strange, but it works.

    However, and this is separate from this original question (I guess):  the actual profile copy does not work.  The account I use to sysprep, from my understanding, is supposed to be copied and become the 'default' profile.  MS's text is here:

    CopyProfileThe CopyProfile setting enables you to customize a user profile and use it as the default user profile. Windows uses the default user profile as a template to assign a profile to each new user.

    To customize the default user profile:
    On the technician computer, create a new answer file (Example: Unattend.xml)

    Set CopyProfile to true in the Unattend.xml file.

    Copy the file to the reference computer.

    On the reference computer, log on as a user whose profile you can customize (for example, the built-in administrator account).

    Customize the desired user-profile settings.

    Run sysprep /generalize /unattend:unattend.xml.

    During the generalize configuration pass, the customized user profile settings are copied to the default user profile. All subsequent user accounts that are created will have the customizations that you have set. For details about the Sysprep command, see the Sysprep Technical Reference in the Windows® Automated Installation Kit (Windows AIK) User's Guide (Waik.chm) or Windows® OEM Preinstallation Kit (Windows OPK) User's Guide (Opk.chm).

    The built-in administrator account profile is deleted and recreated when you perform a clean Windows installation, or run the Sysprep tool. The CopyProfile setting is processed before the built-in administrator account is deleted, so any customizations that you make should appear in new user account profiles, including the new built-in administrator account profile.

    That is NOT my experience.  I more or less had a blank profile (no desktop icons, start menu items, etc).  MS's wording is strange, the implication is that the current/sysprep account will be used, but it doesn't seem so.

    Author Comment

    Not sure if I should just 'accept as solution' on my above post, since I am getting around that particular error but I would like to add a few things/caveats that I am coming across.

    I am using a Win 7 disc w/SP1.  I think that changes the game a bit and I came across this reference here that accounts for that. I wanted to add that info in case someone else has similar problems in the future (even though, at the present I am not getting an end to end setup that I desire)
    Win 7 start to finish
    Referenced in the above link are the
    WAIK SP1 supplemental components
    Method to merge with WAIK RTM iso/install
    LVL 21

    Expert Comment


    I didn't know the info regarding the * in the computer name field. Thanks. Just except your answer as the solution (ID: 35742060). I'm not sure why the CopyProfile is not working for you. I configure my profile and all the settings are carried over to the default profile, except the quick launch shortcuts and shortcuts pinned to the start menu. I do move the start menu shortcuts to the "All users" start menu. I also move the desktop shortcuts to the Public Desktop.


    Author Comment


    I was able to get around the copy profile issue (it was the leftover profiles listed in the registry).  Without copying anything to All Users or Public Desktop I am getting the Administrator/Audit Mode's desktop/start menu and other profile items to be the default, which is what I want.

    Author Closing Comment

    Found answer elsewhere online

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    When you use the right mouse button (assuming you're right handed) to click something in Windows, you usually get what is called a "context menu".  It's called that because the items in the menu vary according to context, that is, according to where…
    New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
    This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
    This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now