Skip to content

Windows 10 System Image Manager (SIM) Unattend answer file

Note: OS Used is Windows 10 Creator’s Update Enterprise Trial (Win10CU-EntT)

DL ADK 1703 from here: https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit

Install deployment tools from ADK which includes Windows SIM.
Open PS run this:
Go to path of adksetup.exe

.\adksetup.exe /features OptionId.DeploymentTools /ceip off /q /l c:\logs\adklog.txt

Run Windows SIM with this command in PS:

& 'C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\WSIM\imgmgr.exe'

Mount Windows 10 ISO right click file and Mount.
Open mounted drive and copy \sources\install.wim file to local folder c:\imagestore
Right click install.wim > properties > uncheck readonly
Open Windows SIM (WSIM) (Type Image in search bar)
Open install.wim Image File in bottom left
Say Yes to create catalog file
Generating catalog file

I was getting the above errors with the Answer file from the Answer File Generator site (AFG) so decided to manually create it as some settings have been changed in recent Windows 10 releases.

Right click the answer file area and select New Answer File
I followed the steps here (https://technet.microsoft.com/en-us/library/cc749317(v=ws.10).aspx) to see which components to add to the configuration passes. You need to carefully go through them as some settings have changed in the recent windows 10 releases. Make sure you are selecting amd64 components and not x86 which are for 32bit.

Save the Answer file as Autounattend.xml once done.
Part 1 talks about adding the XML file to the ISO so how to extract the readonly ISO and save the XML inside using a PowerShell function then saving it as a new ISO using ImgBrn.
Part 2 is a bit easier and adds the XML file to a floppy image file which can be mounted in VirtualBox. This saves us having to edit and recreate the ISO. The new VM will pick up the XML file at boot alongside the ISO mounted to CD.

PART 1

To copy XML to the root of your ISO

Mount ISO in Windows and add file then save as a new ISO. To do this you can use ImgBrn software:
ImgBurn > Select Create Image > Click advanced > tick  make image bootable > in extract boot image select the mounted iso file then click save icon > say yes use bootimage file save to local folder > click browse folder in sources > select root of mounted iso > browse for file and select autounattend.xml > select destination and name for iso file Windows10CU-EntUnattend.iso > Click Build Image

Or another method is using a PowerShell Function shown below:

install 7-zip then browse to it in PowerShell type:

cd "c:\program files\7-zip\"

extract the ISO file to local folder
Run the following in PowerShell:

C:\Program Files\7-Zip>.\7z.exe x "C:\users\iq\downloads\15063.0.170317-1834.RS2_RELEASE_CLIENTENTERPRISEEVAL_OEMRET_X64FRE_EN-US.iso" -o"c:\imagestore<br>\extractediso"

Quick check no. of files are the same in mounted ISO and extracted ISO:

Write-Host (Get-ChildItem "C:\imagestore\extractediso\" -Recurse | measure).count<br>Write-Host (Get-ChildItem "F:\" -Recurse | measure).count

Save new ISO as new file with PowerShell
DL ISO File PowerShell function https://gallery.technet.microsoft.com/scriptcenter/New-ISOFile-function-a8deeffd#content
Save it in ISE using .ps1 extension
Run it using

. .\ISO_Script.ps1


Run the Cmdlet which adds the XML and extracted ISO files into a new ISO:
Type:

New-IsoFile -Source "C:\imagestore\autounattend.xml", "C:\imagestore\extractediso" -path "C:\imagestore\test\Win10ISO_PS.iso" -Verbose -Force

Run this Command to add the bootfile:

dir "c:\imagestore\extractediso", "c:\imagestore\autounattend.xml" | New-IsoFile -path "C:\imagestore\test\Win10ISO_PS.iso" -BootFile "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\efisys.bin" -Media DVDPLUSR -Title "Win10PS_Boot" -Verbose -Force

PART 2

After editing the answer file in WSIM, the Autounattend.xml file can be copied to a floppy image and mounted to the VM in Virtualbox. This saves us having to repackage the ISO file.

In linux terminal run:

dd bs=512 count=2880 if=/dev/zero of=floppy.img


This creates a floppy.img file in the current folder path
Mount this to an existing Windows 10 VM in VirtualBox and then start the VM. Open My Computer, right click Floppy Drive and Click Format. Format as FAT and the default settings. Copy the Autounattend.xml file to the floppy.
Now switch off the VM, dismount the floppy and add the floppy to the new Win10 Unattended VM we are making.

The setup should start and run through the process. Cortana pops up during this and starts talking to you and some things need user input. For now I don’t think there is a way to make this silent or automated?

REFS:

https://docs.microsoft.com/en-us/windows-hardware/get-started/what-s-new-in-kits-and-tools
https://docs.microsoft.com/en-us/windows/deployment/windows-adk-scenarios-for-it-pros
https://docs.microsoft.com/en-gb/windows-hardware/customize/desktop/wsim/windows-system-image-manager-technical-reference

0 0 votes
Article Rating
Share this Post
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x