Open windows System Image Manager
Create a new answer File from the menu
In the lower left side of the form, right-click Windows image, select menu select Windows image
Select a. wim (Windows Image) or. CLG (Catalog) file in the pop-up window. The Windows installation CD or ISO file contains a install.wim file and some catalog files that I copied from the ISO in Windows Server R2. For the production of answer file, the general choice of catalog files can be. I choose "Install_windows Server R2 SERVERENTERPRISE.CLG" here
Expand Packages\fundation, right-click to select "Add to Answer File"
Select what we want to modify in the answer file to install IIS as an example
Finally, in the File menu, select Save Answer file, which reads as follows
<?xml version= "1.0" encoding= "Utf-8"?>
<unattend xmlns= "Urn:schemas-microsoft-com:unattend" >
<servicing>
<package action= "Configure" >
<assemblyidentity name= "Microsoft-windows-foundation-package" version= "6.1.7600.16385" processorArchitecture= " AMD64 "publickeytoken=" 31bf3856ad364e35 "language=" "/>
<selection name= "Iis-webserverrole" state= "true"/>
</package>
</servicing>
<cpi:offlineimage cpi:source= "catalog:[path_to_your_catalog_file]install_windows server R2 SERVERENTERPRISE.CLG "xmlns:cpi=" URN:SCHEMAS-MICROSOFT-COM:CPI "/>
</unattend>
Note: Path_to_your_catalog_file was originally the path to the CATALOG file on my machine, and I replaced it here.
How to use Windows System Image Manager to make a answer file