- Disabling the language settings dialog
- Disabling the Select Operating System dialog
- Disabling the EULA dialog
- Disabling the Disk Allocation dialog
- Disabling the Administrator password prompt
- Set up vagrant autologin
- Do not show Server Manager at logon
- Disable User Account Control (UAC)
- Disable Internet Explorer Enhanced Security Configuration
- Disable Internet Explorer First Run Wizard
- Replace Internet Explorer Bing search with Google
- Enable Remote Desktop
- Turn off computer password
- Turn off all power saving and timeouts
Updated March 19, 2014
- Updated ADK link from version 8 to 8.1
- Updated link to Autounattend.xml
- Added note about using KMS keys
I just recently revised all my automated install XML files for the Windows System Preparation Tool (Sysprep) that I use for my Windows development testbed. For this go around, I’m documenting the XML answer file settings for each version of Microsoft Windows. This article covers the XML answer files settings needed to automate a Windows Server 2012 (64-bit) base OS install.
You’ll need to use the Windows System Image Manager tool to edit Sysprep XML answer files. The Windows System Image Manager is packaged with the Windows Assessment and Deployment Kit tool suite. Download and install the Windows Assessment and Deployment Kit to install the Windows System Image Manager (WSIM).
Link to Autounattend.xml with all the settings in this article. NOTE: Right-click and choose “Download Linked File As…” in your web browser, as many web browsers will try to interpret the Xml.
Disabling the language settings dialog
In the Windows Image pane, select the component amd64_Microsoft-Windows-International-Core-WinPE_6.2.9200.16384_neutral, right-click and choose Add Setting to Pass 1 windowsPE. Using the Answer File Properties and Settings panes, configure the following settings:
- InputLocale = en-US
- SystemLocale = en-US
- UILanguage = en-US
- UserLocale = en-US
In the Windows Image pane, select the component amd64_Microsoft-Windows-Setup_6.2.9200.16384_neutral, right-click on UserData/ProductKey and choose Add Setting to Pass 1 windowsPE. Using the Answer File Properties and Settings panes, configure the following settings:
- Key = YOUR_PRODUCT_KEY
- WillShowUI = OnError
The official Microsoft KMS keys are listed here and make a good starting point to test installs.
Disabling the Select Operating System dialog
In the Windows Image pane, select the component amd64_Microsoft-Windows-Setup_6.2.9200.16384_neutral, right-click on ImageInstall/OSImage/InstallFrom/Metadata and choose Add Setting to Pass 1 windowsPE. Using the Answer File Properties and Settings panes, configure the following settings:
- Key = /IMAGE/NAME
- Value = Windows Server 2012 SERVERDATACENTER
NOTE: Make sure the /IMAGE/NAME
value matches the Windows Server 2012
Image flavor you selected. Possible values are:
- Windows Server 2012 SERVERDATACENTER
- Windows Server 2012 SERVERDATACENTERCORE
- Windows Server 2012 SERVERSTANDARD
- Windows Server 2012 SERVERSTANDARDCORE
Disabling the EULA dialog
In the Windows Image pane, select the component amd64_Microsoft-Windows-Setup_6.2.9200.16384_neutral, right-click on UserData and choose Add Setting to Pass 1 windowsPE. Using the Answer File Properties and Settings panes, configure the following settings:
- AcceptEula = true
Disabling the Disk Allocation dialog
In the Windows Image pane, select the component amd64_Microsoft-Windows-Setup_6.2.9200.16384_neutral, right-click on DiskConfiguration and choose Add setting to Pass 1 windowsPE. Using the Answer File Properties and Settings panes, configure the following settings:
- WillShowUI = OnError
In the Windows Image pane, select the component amd64_Microsoft-Windows-Setup_6.2.9200.16384_neutral, right-click on DiskConfiguration/Disk and choose Add setting to Pass 1 windowsPE. Using the Answer File Properties and Settings panes, configure the following settings:
- DiskID = 0
- WillWipDisk = true
In the Windows Image pane, select the component amd64_Microsoft-Windows-Setup_6.2.9200.16384_neutral, right-click on DiskConfiguration/Disk/CreatePartitions/CreatePartition and choose Add setting to Pass 1 windowsPE. Using the Answer File Properties and Settings panes, configure the following settings:
- Extend = false
- Order = 1
- Size = 10000
- Type = Primary
NOTE: Don’t worry about getting the size exact - just set it to a reasonable minimum. In the next setting, we will extend the partition to fill all remaining disk space on the drive.
In the Windows Image pane, select the component amd64_Microsoft-Windows-Setup_6.2.9200.16384_neutral, right-click on DiskConfiguration/Disk/ModifyPartitions/ModifyPartition and choose Add setting to Pass 1 windowsPE. Using the Answer File Properties and Settings panes, configure the following settings:
- Active = true
- Extend = true
- Format = NTFS
- Letter = C
- Order = 1
- PartitionID = 1
In the Windows Image pane, select the component amd64_Microsoft-Windows-Setup_6.1.7600.16385_neutral, right-click on ImageInstall/OSImage/InstallTo and choose Add setting to Pass 1 windowsPE. Using the Answer File Properties and Settings panes, configure the following settings:
- DiskID = 0
- PartitionID = 1
Disabling the Administrator password prompt
In the Windows Image pane, select the component amd64_Microsoft-Windows-Shell-Setup_6.2.9200.16384_neutral, right-click on UserAccounts/AdministratorPassword and choose Add Setting to Pass 7 oobeSystem. Using the Answer File Properties and Settings panes, configure the following settings:
- Value = vagrant
Set up vagrant autologin
In the Windows Image pane, select the component amd64_Microsoft-Windows-Shell-Setup_6.2.9200.16384_neutral, right-click on UserAccounts/LocalAccounts/LocalAccount and choose Add Setting to Pass 7 oobeSystem. Using the Answer File Properties and Settings panes, configure the following settings:
- Description = Vagrant User
- DisplayName = vagrant
- Group = Administrators
- Name = vagrant
In the Windows Image pane, select the component amd64_Microsoft-Windows-Shell-Setup_6.2.9200.16384_neutral, right-click on UserAccounts/LocalAccounts/LocalAccount/Password and choose Add Setting to Pass 7 oobeSystem. Using the Answer File Properties and Settings panes, configure the following settings:
- Value = vagrant
In the Windows Image pane, select the component amd64_Microsoft-Windows-Shell-Setup_6.1.9200.16384_neutral, right-click on AutoLogon and choose Add Setting to Pass 7 oobeSystem. Using the Answer File Properties and Settings panes, configure the following settings:
- Enabled = true
- Username = vagrant
In the Windows Image pane, select the component amd64_Microsoft-Windows-Shell-Setup_6.2.9200.16384_neutral, right-click on AutoLogon/Password and choose Add Setting to Pass 7 oobeSystem. Using the Answer File Properties and Settings panes, configure the following settings:
- Value = vagrant
Do not show Server Manager at logon
In the Windows Image pane, select the component amd64_Microsoft-Windows-ServerManager-SvrMgrNc_6.2.9200.16384_neutral, right-click and choose Add Setting to Pass 4 specialize. Using the Answer File Properties and Settings panes, configure the following settings:
- DoNotOpenServerManagerAtLogon = true
Disable User Account Control (UAC)
In the Windows Image pane, select the component amd64_Microsoft-Windows-LUA-Settings_6.2.9200.16384_neutral, right-click and choose Add Setting to Pass 2 offlineServicing. Using the Answer File Properties and Settings panes, configure the following settings:
- EnableLUA = false
Disable Internet Explorer Enhanced Security Configuration
In the Windows Image pane, select the component amd64_Microsoft-Windows-IE-ESC_10.0.9200.16384_neutral, right-click and choose Add Setting to Pass 4 specialize. Using the Answer File Properties and Settings panes, configure the following settings:
- IEHardenAdmin = false
- IEHardenUser = false
Disable Internet Explorer First Run Wizard
In the Windows Image pane, select the component amd64_Microsoft-Windows-IE-InternetExplorer_10.0.9200.16384_neutral, right-click and choose Add Setting to Pass 4 specialize. Using the Answer File Properties and Settings panes, configure the following settings:
- DisableAccelerators = true
- DisableFirstRunWizard = true
- Home_Page = about:blank
In the Windows Image pane, select the component wow64_Microsoft-Windows-IE-InternetExplorer_10.0.9200.16384_neutral, right-click and choose Add Setting to Pass 4 specialize. Using the Answer File Properties and Settings panes, configure the following settings:
- DisableAccelerators = true
- DisableFirstRunWizard = true
- Home_Page = about:blank
Replace Internet Explorer Bing search with Google
In the Windows Image pane, select the component amd64_Microsoft-Windows-IE-InternetExplorer_10.0.9200.16384_neutral, right-click on SearchScopes/Scope and choose Add Setting to Pass 4 specialize. Using the Answer File Properties and Settings panes, configure the following settings:
- ScopeDefault = true
- ScopeDisplayName = Google
- ScopeKey = Google
- ScopeUrl = http://www.google.com/search?q={searchTerms}
- ShowSearchSuggestions = true
In the Windows Image pane, select the component wow64_Microsoft-Windows-IE-InternetExplorer_10.0.9200.16384_neutral, right-click on SearchScopes/Scope and choose Add Setting to Pass 4 specialize. Using the Answer File Properties and Settings panes, configure the following settings:
- ScopeDefault = true
- ScopeDisplayName = Google
- ScopeKey = Google
- ScopeUrl = http://www.google.com/search?q={searchTerms}
- ShowSearchSuggestions = **true
Enable Remote Desktop
In the Windows Image pane, select the component amd64_Microsoft-Windows-TerminalServices-LocalSessionManager_6.2.9200.16384_neutral, right-click and choose Add Setting to Pass 4 specialize. Using the Answer File Properties and Settings panes, configure the following settings:
- fDenyTSConnections = false
In the Windows Image pane, select the component amd64_Networking-MPSSVC-Svc_6.2.9200.16384_neutral, right-click on FirewallGroups/FirewallGroup and choose Add Setting to Pass 4 specialize. Using the Answer File Properties and Settings panes, configure the following settings:
- Active = true
- Group = Remote Desktop
- Key = RemoteDesktop
- Profile = all
In the Windows Image pane, select the component amd64_Microsoft-Windows-TerminalServices-RDP-WinStationExtensions_6.2.9200.16384_neutral, right-click and choose Add Setting to Pass 4 specialize. Using the Answer File Properties and Settings panes, configure the following settings:
- SecurityLayer = 1
- UserAuthentication = 0
Turn off computer password
Prevent the image from changing its computer account password, so you can restore old snapshots without being dropped from a domain
REG ADD "HKLM\System\CurrentControlSet\Services\Netlogon\Parameters" /v DisablePasswordChange /t REG_DWORD /d 1 /f
In the Windows Image pane, select the component amd64_Microsoft-Windows-Shell-Setup_6.2.9200.16384_neutral, right-click FirstLogonCommands/SynchronousCommand” and choose _Add Setting to Pass 7 oobeSystem. Using the Answer File Properties and Settings panes, configure the following settings:
- CommandLine = REG ADD “HKLM\System\CurrentControlSet\Services\Netlogon\Parameters” /v DisablePasswordChange /t REG_DWORD /d 2 /f
- Description = Disable computer password change
- Order = 1
- RequiresUserInput true
Turn off all power saving and timeouts
1 2 3 4 5 |
|
In the Windows Image pane, select the component amd64_Microsoft-Windows-Shell-Setup_6.2.9200.16384_neutral, right-click FirstLogonCommands/SynchronousCommand” and choose _Add Setting to Pass 7 oobeSystem. Using the Answer File Properties and Settings panes, configure the following settings:
- CommandLine = cmd.exe /c a:set-power-config.bat
- Description = Turn off all power saving and timeouts
- Order = 2
- RequiresUserInput = true