Unattended Setup of Windows 8 to Surface Pro
In today’s blog I am going to explain how you can do an unattended setup of the default Windows 8 Enterprise X64 install.wim to a Surface Pro from a USB drive. Unattended setups are not new but when you are deploying to the Surface Pro (or any other UEFI system) there are some special considerations around disk partitioning and booting from USB.
Step #1: Prepare USB drive
- Locate a 4GB or larger USB flash drive
- Open Diskpart and run the following command
- List disk
- Identify the disk # of the flash drive
- Sel disk X where X is the USB drive(make sure to choose correct one)
- Clean
- Create part primary
- Assign
- Active
- Format FS=FAT32 quick. Note: It must be FAT32
- Exit
- Copy the entire contents of your Windows 8 Enterprise X64 DVD to the USB drive
Note: It is also possible to replace the default install.wim in the sources folder with your own custom install.wim. The image must be prepared using Sysprep with the /generalize and /oobe command line switches. If the install.wim is >4GB you will have either split the .wim or prepare the USB drive with multiple partitions. See https://blogs.technet.com/b/askcore/archive/2013/03/20/creating-bootable-usb-drive-for-uefi-computers.aspx for more information
Step #2: Create autounattend.xml
Using Windows System Image Manger create an autounattend.xml and then copy it to the root of the USB flash drive.
Since the Surface Pro is a UEFI system you must create different disk partitioning then a legacy BIOS based computer. I have attached a sample autounattend.xml to the blog that is fully automated and will end with you logged in to the computer as local administrator account. My disk partitioning follows the default configuration. Below shows the different partitions and sizes
Figure 1. Default UEFI disk configuration
If you want to setup for recovery partition scenarios see the Recommended Configuration: System Recovery.
Step #3: Boot from the USB drive
To boot from USB on the Surface Pro you must do the following:
- Press and hold the volume down button
- Press the power button
- When you see the Surface Logo you can let go of the buttons
If it doesn’t boot from the USB drive check the following:
- Make sure you have formatted the drive FAT32
- Try the USB drive in another computer(UEFI and Legacy BIOS) to see if it works
Here is autounattend.xml.
Note: This answer file sets the local administrator password to Password1
Hope this helps with your deployments. Stay tuned for more Surface Pro deployment related blogs
Scott McArthur
Senior Support Escalation Engineer
Microsoft Customer Support & Services
Comments
- Anonymous
January 01, 2003
Sam,AndrewI just downloaded the file and it downloaded okay for me. 4.88kb. Can you try again? What browser are you using? - Anonymous
January 01, 2003
I am right clicking the autounattend.xml and choosing save as target, select my desktop. Then I open it with Notepad or Windows System Image Manager - Anonymous
January 01, 2003
We've moved the autounattend.xml into the blog itself for those having download problems. - Anonymous
January 01, 2003
Added the NOTE: at the end below the file.Note: This answer file sets the local administrator password to Password1 - Anonymous
January 01, 2003
The sample autounattend.xml file seems to be zero length when saved with IE8. - Anonymous
April 05, 2013
Same here Sam.The autounattend.xml file is definitely empty. - Anonymous
April 10, 2013
Still 0 kb in download via IE10, Firefox and Chrome on W8.Pete - Anonymous
April 15, 2013
What is the default program that Scott McArthur is using to open XML files?WHen I use Dreamweaver or Notepad, it opens empty - Anonymous
April 16, 2013
@ Z Man - That's because the download is still broken. @ Scott please fix the download. Obviously something is blocking it on the blog site. I can't believe after so many comments you don't see that there is a problem.Pete - Anonymous
April 25, 2013
Thank you! - Anonymous
April 28, 2013
The spaces need to be removed in the tags of the xml file or you will get errors in WSIM. For example < /unattend> needs to be </unattend>.I was able to get as far as launching the Win8Setup but can't get it to read the xml. I put it in the root of the USB drive as specified. Does anything need to be changed with the XML file? - Anonymous
May 10, 2013
Do you need to disable SecureBoot to install/re-install Windows 8 Enterprise x64, or does it all just work ?Presumably the latter. - Anonymous
July 17, 2013
what's the admin Password? - Anonymous
July 30, 2013
Is important in unattend créate partition first - Anonymous
July 30, 2013
Problem with custom installation Wim fileHello friends I'm writing from MexicoFirst of all sorry for the spelling not much EnglishI need your helpI am installing Windows 8 enterprise 9470 HP Folio team and has a hard160 gb SSD and the question is as followsinstall all the applications that I require but when caputar my wim file and attach it appears to mean an error windows 8Wim file that is not in our catalog and you change the configuration file if anyone can help el.cfg if the error is on the hard drive or something elsethanks for the help - Anonymous
May 03, 2017
Took this apart and heavily tweaked it for my environment in Windows System Image Manager. It worked great on the Surface Pro 4 and Windows 10!