Skip to end of metadata
Go to start of metadata

In this article:

This article contains information about what a Sysprep Answer File is, how they are used by Macrium SiteDeploy, and how to use your own to complete post-deployment tasks.

What is a Sysprep Answer File?

Once Sysprep has been run, the operating system will enter the first-time setup (also known as the Out of Box Experience) the next time that it is booted. The Out of Box Experience (OOBE) is run out of the box to set up the operating system, this is where options like the system locale and language are specified, and local accounts are created. The OOBE does not take too long when setting up a limited number of operating systems but can become very time-consuming when deploying an image to a larger number of endpoints.

A Sysprep answer file is an XML file that specifies settings that are used during the OOBE. At its simplest, the answer file can be used to skip the OOBE and reduce the post-deployment configuration on an endpoint. More advanced use cases enable the endpoints to be renamed, default administrator accounts to be configured, and domain join the endpoints post-deployment.

It is clear that answer files are an extremely powerful tool for deployment administrators. 

Answer Files and Macrium SiteDeploy®

Macrium SiteDeploy® contains a default answer file that can be found on the Site Manager server at C:\ProgramData\Macrium\SiteManager\UnattendTemplate-Example.xml. This answer file is designed to skip the OOBE and contains variables that can be specified during the centrally-initiated deployment (computer name and default administrator account password). For more information on specifying variables during deployment, see this article.

The answer file is copied to the relevant location on the target endpoints post-deployment and pre-restart. The answer file will then be read by the operating system when the OOBE is reached. 

The default answer file is shown below:

Default Answer File

<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<!-- EXAMPLE FILE - This file (UnattendTemplate-Example.xml) will be overwritten when SiteDeploy is upgraded. To use your own template, copy this file or supply your own as UnattendTemplate.xml Any use of $COMPUTERNAME$ will be replaced by the computer's new name in deployment. $ADMINPASSWORD$ will be replaced by the Administrator account password set in the SiteDeploy UI. This is provided to prevent passwords being stored in plain text. -->
<settings pass="offlineServicing"/>
<settings pass="windowsPE"/>
<settings pass="generalize"/>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<ComputerName>$COMPUTERNAME$</ComputerName>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<ComputerName>$COMPUTERNAME$</ComputerName>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand>
<Order>1</Order>
<!-- Without this command, the Administrator account will be disabled -->
<Path>net user Administrator /ACTIVE:YES</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand>
<Order>1</Order>
<!-- Without this command, the Administrator account will be disabled -->
<Path>net user Administrator /ACTIVE:YES</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="auditSystem"/>
<settings pass="auditUser"/>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<!-- Set US locale, language and keyboard settings -->
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<!-- Set US locale, language and keyboard settings -->
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<UserAccounts>
<AdministratorPassword>
<Value>$ADMINPASSWORD$</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
</UserAccounts>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<SkipUserOOBE>true</SkipUserOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<UserAccounts>
<AdministratorPassword>
<Value>$ADMINPASSWORD$</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
</UserAccounts>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<SkipUserOOBE>true</SkipUserOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
</component>
</settings>
</unattend>

Using a Custom Answer File

Users can also specify their own custom answer files. These answer files can be edited to perform a variety of steps during the OOBE. However, it is important to note that the default answer file is overwritten by the SiteDeploy® installer, meaning that the default answer file will be recreated during upgrades. To avoid this, custom answer files should be named UnattendTemplate.xml and placed in the C:\ProgramData\Macrium\SiteManager folder. The full path to the custom answer file will be C:\ProgramData\Macrium\SiteManager\UnattendTemplate.xml. Macrium SiteDeploy® will first attempt to use the custom answer file, if this cannot be found, SiteDeploy® will fall back to using the default answer file.

The variables $COMPUTERNAME$ and $ADMINPASSWORD$ can be used in the custom answer file. If these variables are used, they will be replaced by values that the user specifies on the 'Options' page of the deployment wizard.

  • No labels