Go to ...

RSS Feed

August 14, 2020

Answer file – Autounattend.xml or Unattend.xml?

Last weekend, I saw a post on Ten Forums that really got my attention. A fellow member had been preparing a deployment image, and was wondering why his answer file simply did not work. Here’s an extract from the original post:

I’ve followed tutorials on Ten Forums, Win10Guru, docs.microsoft.com, and many others. I’ve made my own with the Windows System Image Manager and I’ve used the Answer File Generator online. I’ve copied and pasted others I’ve found online. Nothing seems to work.

My first reply was somewhat arrogant. I have never suffered from this fatal disease called Modesty. That’s how I know that my tutorials are valid for certain:

Please do not take this wrong: I have written each and every Sysprep and Windows image customization tutorial and instructions post you can find both here on Ten Forums, and on Win10.guru. Every single of them is valid, instructions correct, and if user follows them, the answer files and custom deployment will work.

The same can be said from docs.microsoft.com; I’ve never seen them to post invalid instructions regarding this topic.

OK, first we fixed the errors in OP’s answer file, and I was finally able to post a corrected and cleaned answer file to him. OP tested it, and came back telling that it only worked for OOBE, automating it as it should do, but that first part of deployment, Windows Setup was still not working. OP had to enter region and keyboard manually, select OS and edition, partition HDD and so on.

Testing it on my end, it worked perfectly both on physical installation and on Hyper-V virtual machine. Boot from install media, next stop Windows Desktop, without a single mouse click or any other user interaction. For hours I tried to find the reason why something working perfectly for me, was not working for the OP. I finally gave up, and told that to OP.

But, as it often happens, just after telling the OP I must give up, it dawned to me. Posted one more reply, screenshot showing the full post. Click it to open enlarged in a new tab:

The two most commonly used answer files in most common deployment scenarios are autounattend.xml, which takes care of Windows Setup including partitioning, and unattend.xml which then takes care of OOBE, Windows Welcome. Typically, autounattend.xml is stored at the root of install media, and unattend.xml in either the %windir%\Panther or the %windir%\System32\Sysprep folder. The four missing letters auto in filename, that’s all it took for OP’s Windows Setup completely ignore the region and keyboard settings, OS selection and partitioning, requiring him to do them manually.

A sample autounattend.xml file and instructions for editing it to meet your needs: Simple deployment with autounattend.xml answer file

It was an interesting night, from half past midnight to almost 7 AM. Thanks to heavenly geeks I am an insomniac, and we finally fixed it by adding the prefix auto to the answer file’s filename! Sometimes getting things right — and working — can be just as simple as that. Go figure!


Author: Kari Finn

A former Windows Insider MVP, Kari started in computing in the mid 80’s writing code for VAX / VMS systems. Since then, he’s worked in a variety of IT positions. He specializes in Windows image capture, customization, repair and deployment as well as Hyper-V virtualization. Kari is a proud Team Member at number #1 Windows site TenForums.com.

Leave a Reply

More Stories From 19H1