I have a Windows 7 Deployment Point DVD that I created using the Microsoft Deployment Toolkit 2010 for a client, and it has been a godsend during the past ten days. Because the client wants to make copies to send to their remote locations around the country, I spent a couple of hours scripting as much as I could so that the process would be as simple as possible for the end-users, and so that the corporate computers around the country would all meet my (their) guidelines. I tested the deployment media on physical hardware and there were absolutely no problems. Now all that was left was for me to create a document to go with it. To do this, I created a virtual machine within my Hyper-V laptop so that I could use TechSmith’s SnagIt tool to capture my screen shots.
…and I started getting an error telling me that ‘Windows could not parse or process unattend answer file [C:\Windows\Panther\unattend.xml] for pass [specialize]. The answer file is invalid.’
What am I to do?
Why did it work on physical hardware, and is not working in the virtual machine?
During my Troubleshooting LiteTouch Deployment using MDT session at TechDays Canada I remind my audience that if they get an error they shouldn’t close down the system when they get an error… there is so much to be learned from the files that might simply disappear if they are on the RAMDrive. I pressed <Shift-F10> and looked for the guilty file, and sure enough, under the Specialize Pass section there was the error… the ComputerName field was FAR too long!
When scripting the deployment point one of the rules I included was the following lines to script the computer name to be the same as the serial number:
The serial number for the Vostro laptops that the company bought is an 8 character Asset Tag. This works perfectly because the maximum computer name can be is 15 characters. Unfortunately the serial number of my Hyper-V virtual machine was much longer – in this case the string read:
Because of that the deployment was failing. 32 characters! Of course this is not going to be limited to virtual machines. Some vendors have longer serial numbers than others. If you created a deployment point that works fine with your HPs that you want to use to deploy Windows 7 on a white-box PC, you may encounter the same issue. If you have many systems that you are going to encounter the problem on then you probably will want to go back and recreate your deployment point, whether that be a USB key or (as was the case here) the ISO file. However if you have a one-off machine that is outside the norm – say, a lab PC that you use to test applications – then for those of you who are adventurous, the following will work, and will save you doing all of that:
- Restart the machine as you did previously, initiating the deployment.
- Go through all of your screens until you get the ‘Ready to Begin’ screen, and click Begin. The Task Sequence will start, and will go through the first few tasks pretty quickly. When the Installing Windows… window comes up, your screen should look like the screenshot below. At this point the Unattend.xml file that the deployment uses will have been generated and copied to the C Drive, into two distinct locations.
- Press F8 to open a command prompt.
- Navigate to the first file location (C:\$Windows.~BT\Sources\Panther).
- type notepad Unattend.xml.
- In the Notepad window search for the string <ComputerName>.
- Change the string between <ComputerName> and </ComputerName> to an acceptable name (fewer than 15 characters).
- Save the file and exit from Notepad.
- Navigate to the second file location (C:\MININT)
- Repeat steps 6-9
- Type exit.
(NOTE: Typing EXIT is crucial, as the open command prompt window will prevent the Windows Installation from rebooting the system.)
Now: In the event that you get an error that the deployment is suspended, you might have to wipe the disk first… use these steps only in a clean install scenario, because it will wipe any data on the drive!
- Restart the virtual machine from the DVD.
- When Windows PE comes up, press F8. When the command prompt (will you people finally realize this is NOT DOS!!) comes up type diskpart to start the Disk Partition tool.
- Within the Disk Partition tool type list disk.
- Make sure you pick the disk that you are installing Windows on and type Select Disk # (where # is the number of the disk).
- Type CLEAN
As soon as the partition is wiped you can reboot the computer and restart your deployment.
I hope this helps… now go forth and deploy, and script-sin no more!