Sysprep Windows 7 OEM style only with preset user account and settings?

Posted on 2011-04-27
Last Modified: 2012-05-11
This is going to sound a little odd, but hear me out.  

End goal:  to have a sysprepped image file (ghost, Acronis, etc) of a specific hardware configuration that INCLUDED settings for usernames passwords and config settings like IP addresses.  these machines are to be sold in a commercial environment that does not acutally have a user at the desktop.  it only acts to provide a simple app to run and network.  It does require two NICs, one on the inside (that I want to make static) and another that can be dynamic or static.  
Before i get all the "why windows" questions, let me just say it is what I have to deal with at the moment.  I need the machines to be differnet in their IDs and license codes etc, but the same otherwise. all same hardware.  

I have done the sysprep steps and everything is cool untill the oobe cycle clobers everything.  I have heard about running scripts in the SetupCompete.cmd file, but I wonder how affective that is for thinkgs like user accounts and startup groups etc.  I have been at this for a week and I fear that is long enough to be down the wrong road.
Question by:kseath
    LVL 1

    Expert Comment

    Here is a series of articles - read the vista ones before the Windows t becuase the Windows 7 articles just add to the the Vista content.

    In short, you can definitely create users and many other things with an Answer File - which you can Sysprep to use.  The Vista and 7 imaging and XML answer files are much more complex and capable than the XP ini ones.  But I once you get the process down (reaad the articles) it gets pretty easy.

    For adding users that happens in stage 7, OOBE (below is copyied from the help screen in WSIM


    LocalAccountsLocalAccounts specifies local accounts to be created during installation.

    You can use the sysprep/generalize command in conjunction with LocalAccounts to change account information. See the Best Practices for Authoring Answer Files topic for details.

    Child ElementsLocalAccount
     Specifies a local account to be created during installation.
    Valid PassesauditSystem

    Parent HierarchyMicrosoft-Windows-Shell-Setup| UserAccounts | LocalAccounts
    Applies ToFor the list of the supported Windows editions and architectures that this component supports, see Microsoft-Windows-Shell-Setup.
    XML ExampleThe following XML output shows how to set user accounts.

          <LocalAccount wcm:action="add">
             <Description>Test account</Description>
             <DisplayName>Admin/Power User Account</DisplayName>
             <Group>Administrators;Power Users</Group>
          <LocalAccount wcm:action="add">
             <Description>For testing</Description>
             <DisplayName>Admin Account</DisplayName>
    See AlsoUserAccounts



    Author Comment

    maybe my settings are getting wipe out in the final step?  I set the IP stack info and all that then run from a command line:

    sysprep /generalize /oobe /shutdown /unattend:unattend.xml

    LVL 1

    Expert Comment

    Where are you saving the unattend.xml file?
    LVL 1

    Expert Comment

    Also - what pass is the IP stack configuration being applied. Using the answer file in conjunction with Sysprep is limited.

    From Microsoft:
    "/unattend - Applies the configured settings in the specified answer file when Sysprep runs. Only settings specified in the oobeSystem, auditSystem and/or auditUser passes can be applied during Sysprep."

    If the the settings you want are only done in a pass not mentioned above, you will need to have your answer file applied not to the image with system but instead accessed when the machine is booted up the first time after it has been imaged - this can be as simple as plugging a thumb drive in during that bootup that has the xml file save to the root - MS knows to look for it during initial setup - has to be named a certain way though.  I use WDS so haven't messed with this in a while - but I will look for some documentation on this process and post it here for you - it is likly in one of those 30+ articles I refer to above - but I find the specific location for you.
    LVL 1

    Accepted Solution

    Here ya go - this might work better - I don't recommend using the /unattend switch with sysprep - instead have your answer file applied when you deploy the image.
    Note- I highly recommend you read through the articles 1-11 also, but this part is more specific to the solution you are asking about.

    Image-based deployment using Windows Setup. In this approach, you create your master installation and capture it to a network share as described above. Then you use Windows System Image Manager (Windows SIM) on your technician computer to create an answer file for unattended installation of your master installation by opening the captured WIM file in Windows SIM, creating your answer file, and saving the answer file to the same network share where the captured WIM file resides. Then you boot your destination computers using Windows PE, connect to the network share where the captured WIM file and answer file are located, and run Windows Setup by typing <mapped drive>\setup.exe /unattend:unattend.xml. Windows Setup then copies the captured image onto your destination computer and installs it using the options you’ve specified in your answer file. For more information concerning this scenario, see the Windows AIK Help file.

    Though you may want to look at WDS - I find it a lot easier once setup.
    Image-based deployment using Windows Deployment Services. In this approach, you create your master installation and capture it from a server running Windows Deployment Services (Windows DS). Windows DS is a server role in Windows Server 2008 that represents the next evolutionary version of Remote Installation Services (RIS) which first appeared in Windows 2000 Server. The nice thing about this approach is that you don’t need to use a Windows PE CD to boot each destination computer. Instead, you simply turn them on and they use PXE to obtain an IP address from a DHCP server, then they use TFTP to download a boot client from the Windows DS server, then the boot client applies the captured image. We’ll see how to use Windows DS soon in future articles in this series.

    If you work your way through articles on Deploying Vista - parts 1 through 23 for WDS (24-31 if you want to go the next step and use Deployment Tools) as well as the Articles from the same author has on Windows 7 (though he works off the assumption you have read the VISTA deployment tutorial and mostly hits on changes and new features with Windows 7 - you will find the process becomes much less confusing and really powerful in how much you can do to customize your deployments.



    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Image capture and Deploy method is consist on two phases. In our first phase we capture the image of windows from the PC in which Windows and others softwares are already installed. In second phase we deploy the created image on new PC in which we…
    The "Notification Area" is that area on the righthand side of the Taskbar where your system clock resides, and probably a large number of other icons.  It used to be called, prior to Windows XP, the "system tray."  Programs just love to install an i…
    Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
    This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

    745 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

    14 Experts available now in Live!

    Get 1:1 Help Now