Vista Beta 2 and Sysprep: Hey, what the heck happened to the VM Additions?

If anyone has tried syspreping Windows Vista Beta 2 inside a VM, you may have noticed that the VM Additions are still installed but not functional afterwards (this only happens if you use the /generalize switch).  This is because of the way that the new Sysprep Generalization phase works.  The idea here is that the system starts with a totally clean slate, and PnP detects the "best" driver for the hardware all over again. 

For some reason, the drivers included with the Additions are not detected as the "best" fit.  I'm not on the setup team, so I'm not sure why, but that's what seems to be happening. 

There are a few ways to work around this.  The first, and most obvious way, is not to use the /generalize switch on Sysprep.  While this has the pro of not breaking our Additions, there are a lot of cons involved with doing this.  The big one is that the unique information about the system's identity (the system's SID, for example) aren't reset if you don't generalize, which causes a boatload of problems if you want to deploy the VM to multiple people/places. 

The other - and preferred - way to do this is to provide an answer file to Sysprep when you run it.  You'll need to set the PersistAllDeviceInstalls flag to "true" in the "generalize" pass.  Here's a sample unattend file which contains that information:

<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="">
   <settings pass="generalize">
      <component name="Microsoft-Windows-PnpSysprep" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">

Assuming you've named this file sysprep.xml, you'd tell Sysprep to use this as an answer file with the following command:

sysprep /generalize /unattend:sysprep.xml

(of course, you can throw in any other switches that you need, too.)

Comments (4)

  1. Tony says:

    I was trying to sysprep Vista but it’s prompting me for the product key after every sysprep.  I checked and the product key I have in the unattend.xml is definitely right.  I tried multiple times and I’m not sure what’s wrong.

    My unattend.xml looks like this:

    <unattend xmlns="urn:schemas-microsoft-com:asm.v3">


     <component name="setup">



       <FullName>My Name</FullName>

       <Organization>My Company</Organization>


       <ProductKey>My Product Key</ProductKey>




        <InstallTo DiskID="0" PartitionID="1" />







    My sysprep command looks like this:

    C:WindowsSystem32sysprepsysprep.exe /quiet /generalize /oobe /shutdown /unattend:C:WindowsSystem32sysprepunattend.xml

    It definitely sees the unattend.xml (it gives an error if I type the path incorrectly).  Everything seems correct, but I still need to go thru all the setup after sysprep.  What am I doing wrong?


  2. Tony says:

    Nevermind, I found the problem.

    First of all, that unattend.xml I posted was partially from memory and I’ve found that it wasn’t completely accurate.  Sorry about that.

    But the problem was that I was missing the OOBE component with the HideEULAPage, SkipMachineOOBE, and SkipUserOOBE settings.  Setting those to true did the trick.

    [Glad to hear you got it working Tony. – mikekol]

  3. Cokazn says:

    Can you please post a full copy of you Unattend.xml? I am trying to sysprep build 5472 with an unattend.xml file but the Windows system imager manager does not work with this build thus I cannot create an unattend.xml file.  

    [Actually, the XML in the post should be a complete and valid sysprep.xml example.  The other parts are left out, obviously, because all the example is intended to show is how to tell Sysprep to leave the Additions alone.  There are a lot of other possible settings that could show up in a sysprep.xml file, so I really can’t post a comprehensive example here.  – mikekol]

  4. Fabien says:

    Mikekol, sorry to use this section to ask you what follows.

    As Cokazn, I am looking for a complete sysprep.xml. I understand you can’t post it because it is not the subject of this section but can you send me a complete sample to my mailbox or tell me how to create one?

    My email is


    [Your best bet is probably to check out the Vista website for deployment information.

    – mikekol]

Skip to main content