Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is the process I use for duplicating a Virtual PC (on Windows 7):

1 - Create a new VPC. 2 - Install Windows 7 on the new VPC. 3 - Configure the new Windows 7 installation (install Windows updates, install applications, etc). 4 - Run Sysprep on the new VPC. 5 - Shut down the new VPC. 6 - Make a copy of the new VPC's VHD file. 7 - Create a new VPC, specify "use existing VHD file" in the wizard and provide the name of the copied VHD file.

Above works fine but there is one point that threw me off: During the OOBE for the duplicated VPC, when asked for a user name, I had to specify a different user name than the one I had specified for the base VPC. This makes sense because the copied VPC already has that user name. But what I did not understand is why I was asked for a new user name at all? Is it because it is part of the OOBE process and when the OOBE was designed by Microsoft, they did not think of the fact that base OS images could be copied?

Thanks -


share|improve this question
up vote 2 down vote accepted

look in the c:\sysprep folder of the win7 machine for the unattend.txt .

Translation for the above procedures:

  • if you are installing Win7 from files you copied to a network share, create a folder within the i386 sub-folder called $oem$ .

  • Create a text file using notepad, DOS edit or whatever text editor is your favorite & name it Cmdlines.txt . Copy everything from [commands] & the next 2 lines into that text file & save it. You will change out the appropriate user info for your domain denoted by <> . Place this file in that new $oem$ folder.

  • Copy over net.exe from c:\windows\system32 to the %oem% folder you just created.

  • The unattend file is more than likely created by vpcwizard.exe

  • You will see several sections contained in the unattend.txt file. Verify the OemPreinstall value = "yes". You'll see it. Just open it with a text editor & scan through it.

Other options can be found here

  • Run the sysprep.exe file to save your settings & shut it down. It is now ready to be imaged & will begin the automated process the next time it boots.

All the info you ever need to know about sysprep can be found here.

share|improve this answer
Pete, THANK YOU! One question: I am not installing Win7 from a network share, but from DVD. In this case, do I copy the DVD to disk and then create the $oem$ folder within the i386 folder? PS: My editor is and will always be Vim! ;-) Thanks again. – Sabuncu Jun 16 '10 at 18:43

When you run sysprep it reseals windows and requires the user info again, if you want to keep the same user then there are already well documented methods to script the OOBE process.

Create a $oem$ folder in you I386 (from where you start setup).
Create a Cmdlines.txt file with the following section:
".\net user <UserName> <Password> /add"
".\net group Administrators <UserName> /add"
Copy of the Net.exe in the $oem$ folder.
In Unattend.txt file, make sure the Oempreinstall value is set to Yes.
Run an unattended setup.
share|improve this answer
Thank you. Scripting the OOBE is through ImageX and DISM etc? – Sabuncu Jun 15 '10 at 10:04
Thank you again but your edit is over my head. I don't start "setup", I use vpcwizard.exe to create a new VPC (and specify existing VHD file). I can manage the other steps once I understand how/where 'setup' and 'I386' folders figure in. Also, does the Unattend.txt file already exist, or is it a new file I create? – Sabuncu Jun 15 '10 at 14:02
I recommend you google on how to use sysprep.inf with the unattend.txt options for more info, but these folders are new ones in your VHD. syspref.inf is probably on there under a folder called sysprep – JamesRyan Jun 18 '10 at 13:46
Thanks again -- – Sabuncu Jun 20 '10 at 18:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.