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

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

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.
  • 4
1 Solution
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


kseathAuthor Commented:
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

Where are you saving the unattend.xml file?
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.
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.



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.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

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